Movatterモバイル変換


[0]ホーム

URL:


Temporal Disaggregation of Time Series

Temporal disaggregation methods are used to disaggregate low frequency time series to higher frequency series, where either the sum, the average, the first or the last value of the resulting high frequency series is consistent with the low frequency series. Temporal disaggregation can be performed with or without one or more high frequency indicator series. The packagetempdisagg is a collection of several methods for temporal disaggregation.

Christoph Sax (State Secretariat of Economic Affaires, Bern, University of Basel) , Peter Steiner (Federal Finance Administration, Bern, University of Bern)
2013-08-26

1 Introduction

Not having a time series at the desired frequency is a common problemfor researchers and analysts. For example, instead of quarterly sales,they only have annual sales. Instead of a daily stock market index, theyonly have a weekly index. While there is no way to fully make up for themissing data, there are useful workarounds: with the help of one or morehigh frequency indicator series, the low frequency series may bedisaggregated into a high frequency series. For example, quarterlyexports could help disaggregating annual sales, and a foreign stockmarket index could help disaggregating the stock market index at home.

Even when there is no high frequency indicator series, one still maywant to disaggregate a low frequency series. While the accuracy of theresulting high frequency series will be low, it may still be worth doingso. For example, estimating a vector-autoregressive model requires allvariables to have the same frequency. Having one bad high frequencyseries could still be preferable to the switch to a lower frequency.

The packagetempdisagg(Sax and Steiner 2013) implements the following standard methods for temporaldisaggregation: Denton, Denton-Cholette, Chow-Lin, Fernandez andLitterman. On the one hand,Denton(Denton 1971) andDenton-Cholette(e.g.Dagum and Cholette 2006) are primarily concernedwith movement preservation, generating a series that is similar to theindicator series whether or not the indicator is correlated with the lowfrequency series. Alternatively, these methods can disaggregate a serieswithout an indicator. On the other hand, Chow-Lin, Fernandez andLitterman use one or several indicators and perform a regression on thelow frequency series.Chow-Lin(Chow and Lin 1971) is suited forstationary or cointegrated series, whileFernandez(Fernández 1981)andLitterman(Litterman 1983) deal with non-cointegrated series.

All disaggregation methods ensure that either the sum, the average, thefirst or the last value of the resulting high frequency series isconsistent with the low frequency series. They can deal with situationswhere the high frequency is an integer multiple of the low frequency(e.g. years to quarters, weeks to days), but not with irregularfrequencies (e.g. weeks to months).

Temporal disaggregation methods are widely used in official statistics.For example, in France, Italy and other European countries, quarterlyfigures of Gross Domestic Product (GDP) are computed usingdisaggregation methods. Outside of R, there are several softwarepackages to perform temporal disaggregation: Ecotrim byBarcellan et al. (2003);a Matlab extension byQuilis (2012); and a RATS extension byDoan (2008). Anoverview of the capabilities of the different software programs is givenin Table1.1

The first section discusses the standard methods for temporaldisaggregation and summarizes them in a unifying framework. Section 2discusses the working and implementation of thetempdisagg package.Section 3 presents an illustrative example.

2 A framework for disaggregation

The aim of temporal disaggregation is to find an unknown high frequencyseries\(y\), whose sums, averages, first or last values are consistentwith a known low frequency series\(y_l\) (The subscript\(l\) denotes lowfrequency variables). In order to estimate\(y\), one or more other highfrequency indicator variables can be used. We collect these highfrequency series in a matrix\(X\). For the ease of exposition and withoutloss of generality, the terms annual and quarterly will be used insteadof low frequency and high frequency hereafter.

Table 1: Software packages (full/partial/erroneous/no:full/partial/erroneous/no implementation).
MethodsEcotrimMatlab add-onRATS add-ontempdisagg
Chow-Lin (max. log)erroneousfullfullfull
Chow-Lin (min. RSS)fullfullnofull
Fernándezfullfullfullfull
Litterman (max. log)erroneousfullfullfull
Litterman (min. RSS)fullfullnofull
Denton-Cholettepartialerroneousnofull
Dentonnopartialnofull
Contemporaneous constraintpartialpartialnono

The diversity of temporal disaggregation methods can be narrowed byputting the methods in a two-step framework: First, a preliminaryquarterly series\(p\) has to be determined; second, the differencesbetween the annual values of the preliminary series and the annualvalues of the observed series have to be distributed among thepreliminary quarterly series. The sum of the preliminary quarterlyseries and the distributed annual residuals yields the final estimationof the quarterly series,\(\hat{y}\). Formally,\[\hat{y} = p + D u_l \,. \label{eq:decomp} \tag{1}\]\(D\) is a\(n \times n_l\) distribution matrix, with\(n\) and\(n_l\) denotingthe number of quarterly and annual observations, respectively.\(u_l\) isa vector of length\(n_l\) and contains the differences between theannualized values of\(p\) and the actual annual values,\(y_l\):\[u_l \equiv \ y_l - C p \,. \label{eq:residuals} \tag{2}\]Multiplying the\(n_l \times n\) conversion matrix,\(C\), with a quarterlyseries performs annualization. With two years and eight quarters, andannual values representing the sum of the quarterly values (e.g. GDP),the conversion matrix,\(C\), is constructed the following way:2\[C = \begin{bmatrix} 1 & 1 & 1 & 1 & 0 & 0 & 0 & 0\\ 0 & 0 & 0 & 0 & 1 & 1 & 1 & 1\\ \end{bmatrix} \,.\]

Equation(1) constitutes a unifying framework for alldisaggregation methods. The methods differ in how they determine thepreliminary series,\(p\), and the distribution matrix,\(D\). Table2 summarizes the differences in the calculation of\(p\)and\(D\). We will discuss them in turn.

2.1 Preliminary series

The methods ofDenton andDenton-Cholette use a single indicatoras their preliminary series:\[p = X \,,\]where\(X\) is a\(n \times 1\) matrix. As a special case, a constant(e.g. a series consisting of only 1s in each quarter) can be embodied asan indicator, allowing for temporal disaggregation without highfrequency indicator series.

The regression-based methodsChow-Lin,Fernandez andLitterman perform a Generalized Least Squares Regression (GLS) ofthe annual values,\(y_l\), on the annualized quarterly indicator series,\(CX\). In this case,\(X\) represents a\(n \times m\) matrix, where\(m\)denotes the number of indicators (including a possible constant). For agiven variance-covariance matrix,\(\Sigma\), the GLS estimator,\(\hat{\beta}\), is calculated in the standard way (the estimation of\(\Sigma\) is discussed below):\[\hat{\beta}(\Sigma) = \left[ X' C' ( C \Sigma C' )^{-1} C X \right]^{-1} X' C' ( C \Sigma C' )^{-1} y_l \,. \label{eq:GLS} \tag{3}\]The critical assumption of the regression-based methods is that thelinear relationship between the annual series\(CX\) and\(y_l\) also holdsbetween the quarterly series\(X\) and\(y\). Thus, the preliminary seriesis calculated as the fitted values of the GLS regression:\[p = \hat{\beta}X \,. \label{eq:fitted} \tag{4}\]

2.2 Distribution matrix

With the exception of Denton-Cholette, the distribution matrix of alltemporal disaggregation methods is a function of the variance-covariancematrix,\(\Sigma\):\[D = \Sigma \, C' (C\,\Sigma \,C')^{-1} \,. \label{eq:DStandard} \tag{5}\]

TheDenton methods minimize the squared absolute or relativedeviations from a (differenced) indicator series, where the parameter\(h\) defines the degree of differencing. For the additive Denton methodsand for\(h=0\), the sum of the squared absolute deviations between theindicator and the final series is minimized. For\(h=1\), the deviationsof first differences are minimized, for\(h=2\), the deviations of thedifferences of the first differences, and so forth. For the proportionalDenton methods, deviations are measured in relative terms.

For the additive Denton method with\(h=1\), the variance-covariancematrix has the following structure:\[\Sigma_{\,\mathrm{D}} = (\Delta'\Delta)^{-1}= \begin{bmatrix} 1 & 1 & \cdots & 1\\ 1 & 2 & \cdots & 2\\ \vdots & \vdots & \ddots & \vdots \\ 1 & 2 & \cdots & n \end{bmatrix} \,, \label{eq:SDenton} \tag{6}\]where\(\Delta\) is a\(n \times n\) difference matrix with 1 on its maindiagonal,\(-1\) on its first subdiagonal and\(0\) elsewhere. For\(h=2\),\(\Delta'\Delta\) is multiplied by\(\Delta'\) from the left and\(\Delta\)from the right side. For\(h=0\), it is the identity matrix of size\(n\).

Denton-Cholette is a modification of the original approach andremoves the spurious transient movement at the beginning of theresulting series. While generally preferable, the calculation of thedistribution matrix,\(D_{\mathrm{D\,C}}\), does not fit into the simpleframework(seeDagum and Cholette 2006 136, for an extensivedescription).

Chow-Lin assumes that the quarterly residuals follow anautoregressive process of order 1 (AR1), i.e.,\(u_t = \rho u_{t-1} + \epsilon_t\), where\(\epsilon\) is\(\mathrm{WN}(0, \sigma_\epsilon)\) (with\(\mathrm{WN}\) denoting WhiteNoise) and\(\left|\rho\right| < 1\). The resulting covariance matrix hasthe following form:\[\Sigma_{\,\mathrm{CL}}(\rho) =\frac{\sigma^{2}_{\epsilon}}{1 - \rho^{2}} \cdot \begin{bmatrix} 1 & \rho & \cdots & \rho^{n-1}\\ \rho & 1 & \cdots & \rho^{n-2}\\ \vdots & \vdots & \ddots & \vdots \\ \rho^{n-1} & \rho^{n-2} & \cdots & 1 \end{bmatrix} \,.\]The estimation of\(\Sigma_{\,\mathrm{CL}}\) thus requires the estimationof an AR1 parameter\(\rho\), which will be discussed in the next section.The variance,\(\sigma^{2}_{\epsilon}\), cancels out and does not affectthe calculation of neither\(D\) nor\(\hat{\beta}\).

Table 2: Methods for temporal disaggregation.
Methods\(p\)\(D\)\(\Sigma\)
denton\(X\)\(\Sigma \, C' (C \, \Sigma \, C')^{-1}\)\(\Sigma_{\,\mathrm{D}}\)
denton-cholette\(X\)\(D_{\mathrm{D\,C}}\)
chow-lin-maxlog,chow-lin-minrss-ecotrim,\(\hat{\beta}X\)\(\Sigma \, C' (C \, \Sigma \, C')^{-1}\)\(\Sigma_{\,\mathrm{CL}}(\rho)\)
chow-lin-minrss-quilis
litterman-maxlog,litterman-minrss\(\hat{\beta}X\)\(\Sigma \, C' (C \, \Sigma \, C')^{-1}\)\(\Sigma_{\,\mathrm{L}}(\rho)\)
fernandez\(\hat{\beta}X\)\(\Sigma \, C' (C \, \Sigma \, C')^{-1}\)\(\Sigma_{\,\mathrm{L}}(0)\)

The remaining methods deal with cases when the quarterly indicators andthe annual series are not cointegrated.Fernandez andLittermanassume that the quarterly residuals follow a non-stationary process,i.e. \(u_t = u_{t-1} + v_t\), where\(v\) is an AR1\((v_t = \rho v_{t-1} + \epsilon_t\), where\(\epsilon\) is\(\mathrm{WN}(0, \sigma_\epsilon))\). Fernandez is a special case ofLitterman, where\(\rho = 0\), and, therefore,\(u\) follows a random walk.The variance-covariance matrix can be calculated as follows:\[\Sigma_{\mathrm{L}}(\rho) = \sigma^{2}_{\epsilon} \left[\Delta'H(\rho)'H(\rho)\Delta\right]^{-1} \,,\]where\(\Delta\) is the same\(n \times n\) difference matrix as in theDenton case;\(H(\rho)\) is a\(n \times n\) matrix with 1 on its maindiagonal,\(-\rho\) on its first subdiagonal and\(0\) elsewhere. For thespecial case of Fernandez, with\(\rho = 0\), the resulting covariancematrix has the following form:\[\Sigma_{\,\mathrm{L}}(0) = \sigma^{2}_{\epsilon} \cdot (\Delta'\Delta)^{-1} = \sigma^{2}_{\epsilon} \cdot \Sigma_D \,.\]

2.3 Estimating the autoregressive parameter

There are several ways to estimate the autoregressive parameter\(\rho\)in the Chow-Lin and Litterman methods. An iterative procedure has beenproposed byChow and Lin (1971). It infers the parameter from the observedautocorrelation of the low frequency residuals,\(u_l\).

In a different approach,Bournay and Laroque (1979 23) suggest themaximization of the likelihood of the GLS-regression:\[L( \rho, \sigma^2_{\epsilon}, \beta ) = \frac{\exp \left[ - \frac{1}{2} u_{l}' \, \left( C \, \Sigma \, C' \right)^{-1} \, u_{l} \right]} {\left( 2 \pi \right)^{n_{l} / 2} \cdot \left[\det \left( C \, \Sigma \, C' \right) \right]^{1/2} } \,,\]where\(u_{l}\) is given by Eq. (2) and(4).\(\hat{\beta}\) turns out to be the GLS estimator from Eq. (3).The maximum likelihood estimator of the autoregressive parameter,\(\hat{\rho}\), is a consistent estimator of the true value, thus it hasbeen chosen as the default estimator. However, in some cases,\(\hat{\rho}\) turns out to be negative even if the true\(\rho\) ispositive. Thus, by default,tempdisagg constrains the optimizationspace for\(\rho\) to positive values.

A final approach is the minimization of the weighted residual sum ofsquares, as it has been suggested byBarbone et al. (1981):

\[RSS(\rho, \sigma^2_{\epsilon}, \beta) = u_{l}' \left( C \, \Sigma \, C' \right)^{-1} u_{l} \,.\]Contrary to the maximum likelihood approach,\(\sigma^2_{\epsilon}\) doesnot cancel out. The results are thus sensitive to the specification of\(\Sigma\), with different implementations leading to different butinconsistent estimations of\(\rho\).

3 Thetempdisagg package

The selection of a temporal disaggregation model is similar to theselection of a linear regression model. Thus,td, the main function ofthe package, closely mirrors the working of thelm function (packagestats), including taking advantage of theformula interface.3

td(formula,conversion ="sum",to ="quarterly",method ="chow-lin-maxlog",truncated.rho =0,fixed.rho =0.5,criterion ="proportional",h =1,start =NULL,end =NULL, ...)

The left hand side of the formula denotes the low frequency series, theright hand side the indicators. If no indicator is specified, the righthand side must be set equal to1. The variables can be entered as timeseries objects of class"ts" or as standard vectors or matrices. Ifentered as"ts" objects, the resulting series will be"ts" objectsas well.

Theconversion argument indicates whether the low frequency values aresums, averages, first or last values of the high frequency values("sum" (default),"average","first" or"last", respectively).Themethod argument indicates the method of temporal disaggregation,as shown in Table2 (see?td for a complete listingof methods). Theto argument indicates the high frequency destinationas a character string ("quarterly" (default) or"monthly") or as ascalar (e.g. 2,7, for year-semester or week-day conversion). It isonly required if no indicator series is specified (Denton methods), orif standard vectors are used instead of time series objects. Finally,you can set an optional start or end date. This is identical topre-processing the input series withwindow.

td returns an object of class"td". The functionpredict computesthe disaggregated high frequency series,\(\hat{y}\). If the highfrequency indicator series are longer than the low frequency series, theresulting series will be extrapolated.

The implementation oftempdisagg follows the same notation and modularstructure as the exposure in the previous section. Internally,td usestheoptimize function (packagestats) to solve the one-dimensionaloptimization problem at the core of the Chow-Lin and Litterman methods.For GLS estimation,td uses an efficient and nummerically stablealgorithm that is based on theqr-decomposition(Paige 1979).

4 An example

Suppose we have an annual series and want to create quarterly valuesthat sum up to the annual values. Panel 1 of Fig. 1depicts annual sales of the pharmaceutical and chemical industry inSwitzerland,sales.a, from which we want to create a quarterly series.The following example demonstrates the basic use oftempdisagg. It canalso be run bydemo(tempdisagg).

The most simple method is"denton-cholette" without an indicatorseries. It performs a simple interpolation that meets the temporaladditivity constraint. In R, this can be done the following way:

>library(tempdisagg)>data(swisspharma)> m1<-td(sales.a~1,to ="quarterly",method ="denton-cholette")>predict(m1)

td produces an object of class"td". The formula,sales.a ~ 1,indicates that our low frequency variable,sales.a, will bedisaggregated with a constant,1 (see?formula for the handling ofthe intercept in the formula interface). The resulting quarterly valuesof sales can be extracted with thepredict function. As there is noadditional information on quarterly movements, the resulting series isvery smooth (Panel 2 of Fig. 1).

While this purely mathematical approach is easy to perform and does notneed any other data series, the economic value of the resulting seriesmay be limited. There might be a related quarterly series that follows asimilar movement than sales. For example, we may use quarterly exportsof pharmaceutical and chemical products,exports.q (Panel 3 ofFig. 1):

> m2<-td(sales.a~0+ exports.q,method ="denton-cholette")

Because we cannot use more than one indicator with the"denton-cholette" (or"denton") method, the intercept must bespecified as missing in the formula (0). Contrary to the firstexample, theto argument is redundant, because the destinationfrequency can be interfered from the time series properties ofexports.q. Applying thepredict function to the resulting modelleads to a much more interesting series, as shown in Panel 4 ofFig. 1. As the indicator series is longer than theannual series, there is an extrapolation period, in which quarterlysales are forecasted.

graphic without alt text
Figure 1: Disaggregating anannual series to quarterly series with no or one indicatorseries.

With an indicator, the"denton-cholette" method simply transfers themovement of the indicator to the resulting series. Even if in fact therewere no correlation between the two series, there would be a strongsimilarity between the indicator and the resulting series. In contrast,regression based methods transfer the movement only if the indicatorseries and the resulting series are actually correlated on the annuallevel. For example, a Chow-Lin regression of the same problem as abovecan be performed the following way:

> m3<-td(sales.a~ exports.q)

As"chow-lin-maxlog" is the default method, it does not need to bespecified. Like with the correspondinglm method,summary producesan overview of the regression:

>summary(m3)Call:td(formula = sales.a~ exports.q)Residuals:    Min1Q  Median3Q     Max-77.892-7.711-4.6289.64736.448Coefficients:             Estimate Std. Error t valuePr(>|t|)(Intercept)1.241e+011.493e+008.3111.06e-09***exports.q1.339e-021.672e-0480.111<2e-16***---Signif. codes:0***0.001**0.01*0.05 ‘.’0.1 ‘ ’1'chow-lin-maxlog' disaggregation with'sum' conversion36 low-freq. obs. converted to146 high-freq. obs.Adjusted R-squared:0.9946  AR1-Parameter:0 (truncated)

There is indeed a strong correlation between exports and sales, as ithas been assumed in the"denton-cholette" example above. Thecoefficient ofexports.q is highly significant, and the very highadjusted\(R^2\) points to a strong relationship between the twovariables. The coefficients are the result of a GLS regression betweenthe annual series. The AR1 parameter,\(\rho\), was estimated to benegative; in order to avoid the undesirable side-effects of a negative\(\rho\), it has been truncated to 0 (This feature can be turned off).Again, with thepredict function, we can extract the resultingquarterly series of sales (Panel 5 of Fig. 1). Like allregression based methods,"chow-lin-maxlog" can also be used with morethan one indicator series:

> m4<-td(formula = sales.a~ exports.q+ imports.q)

In our example, we actually know the true data on quarterly sales, so wecan compare the estimated values to the true values. With an indicatorseries, both the Denton method and Chow-Lin produce a series that isclose to the true series (Panel 6 of Fig. 1). This is,of course, due to fact that in this example, exports are a goodindicator for sales. If the indicator is less close to the series ofinterest, the resulting series will be less close to the true series.

5 Summary

tempdisagg implements the standard methods for temporaldisaggregation. It offers a way to disaggregate a low frequency timeseries into a higher frequency series, while either the sum, theaverage, the first or the last value of the resulting high frequencyseries is consistent with the low frequency series. Temporaldisaggregation can be performed with or without the help of one or morehigh frequency indicators. If good indicators are at hand, the resultingseries may be close to the true series.



5.1 CRAN packages used

tempdisagg

5.2 CRAN Task Views implied by cited packages

TimeSeries

L. Barbone, G. Bodo and I. Visco. Costi e profitti nell’industria in senso stretto: Un’analisi su serie trimestrali, 1970–1980.Bolletino della Banca d’Italia, 467–510, 1981.
R. Barcellan, T. Di Fonzo, D. Raffaele, V. Staplehurst and D. Buono.Ecotrim: A program for temporal disaggregation of time series. 2003. URLhttps://circabc.europa.eu/w/browse/c6049bc0-c633-4cab-9811-b476ffe08370. Version 1.01.
J. Bournay and G. Laroque. Réflexions sur la méthode d’élaboration des comptes trimestriels.Annales de l’INSÉÉ, 36: 3–30, 1979.
G. C. Chow and A.-L. Lin. Best linear unbiased interpolation, distribution, and extrapolation of time series by related series.The Review of Economics and Statistics, 53(4): 372–375, 1971.
E. B. Dagum and P. A. Cholette.Benchmarking, temporal distribution, and reconciliation methods for time series. New York: Springer-Verlag, 2006.
F. T. Denton. Adjustment of monthly or quarterly series to annual totals: An approach based on quadratic minimization.Journal of the American Statistical Association, 66: 99–102, 1971.
T. Di Fonzo. Temporal disaggregation of a system of time series when the aggregate is known: Optimal vs. Adjustment methods. 63–77, 1994.
T. Doan.Disaggregate: A general procedure for interpolation. 2008. URLwww.estima.com/procs_perl/disaggregate.src. RATS library version Apr. 07, 2008.
R. B. Fernández. A methodological note on the estimation of time series.The Review of Economics and Statistics, 63(3): 471–476, 1981.
R. B. Litterman. A random walk,Markov model for the distribution of time series.Journal of Business & Economic Statistics, 1(2): 169–173, 1983.
C. C. Paige. Fast numerically stable computations for generalized linear least squares problems.SIAM Journal on Numerical Analysis, 16(1): 165–171, 1979.
E. M. Quilis.Temporal disaggregation library. 2012. URLwww.mathworks.com/matlabcentral/fileexchange/24438-. Matlab library version May 08, 2012.
C. Sax and P. Steiner.Tempdisagg: Methods for temporal disaggregation and interpolation of time series. 2013. URLhttp://CRAN.R-project.org/package=tempdisagg. R package version 0.22.

  1. Currently, there is no support for temporal disaggreation methodswith a contemporaneous constraint(Di Fonzo 1994).↩︎

  2. Generally, for annual values representing the sum of the quarterlyvalues,\(C\) is constructed as\(I_{n_l} \otimes [1, 1, 1, 1]\), theKronecker product of an identity matrix of size\(n_l\) and atransposed vector of length\(n/n_l\) (4, in the present case). Ifinstead of sums, annual values are averages of the quarterly values,the transposed vector becomes\([0.25, 0.25, 0.25, 0.25]\). If annualvalues are equal to the first or the last quarterly value, thevector is\([1, 0, 0, 0]\) or\([0, 0, 0, 1]\), respectively.↩︎

  3. There is nodata argument intd, however. Becausetd isworking with series of different length and frequencies, it is notpossible to combine them in a single"data.frame".

    ↩︎

References

Reuse

Text and figures are licensed under Creative Commons AttributionCC BY 4.0. The figures that have been reused from other sources don't fall under this license and can be recognized by a note in their caption: "Figure from ...".

Citation

For attribution, please cite this work as

Sax & Steiner, "Temporal Disaggregation of Time Series", The R Journal, 2013

BibTeX citation

@article{RJ-2013-028,  author = {Sax, Christoph and Steiner, Peter},  title = {Temporal Disaggregation of Time Series},  journal = {The R Journal},  year = {2013},  note = {https://doi.org/10.32614/RJ-2013-028},  doi = {10.32614/RJ-2013-028},  volume = {5},  issue = {2},  issn = {2073-4859},  pages = {80-87}}

© The R Foundation,web pagecontact.


[8]ページ先頭

©2009-2026 Movatter.jp