Learn R Programming

tempdisagg (version 0.22)

td: Temporal Disaggregation of Time Series

Description

Perform temporal disaggregation or interpolation of low frequency to high frequency time series. td can be used with objects of class "ts" as well as with basic vectors.

Usage

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, ...)

Arguments

formula
an object of class "formula": a symbolic description of the the temporal disaggregation model. The details of model specification are given under 'Details'.
conversion
type of conversion: "sum", "average", "first" or "last".
method
method of temporal disaggregation: "chow-lin-maxlog", "chow-lin-minrss-ecotrim", "chow-lin-minrss-quilis", "chow-lin-fixed", "fernandez", "litterman-maxlog", "li
to
high-frequency destination frequency as a character string ("quarterly" or "monthly") or as a scalar (e.g. 2, 4, 7, 12). If the input series are ts objects,
truncated.rho
lower bound for the autoregressive parameter $\rho$. If set to 0 (default), no negative values are allowed. If set to -1, truncation is disabled.
fixed.rho
set a predefined autoregressive parameter $\rho$. Only works with the methods "chow-lin-fixed" and "litterman-fixed".
criterion
minimzation criterion for Denton methods: "proportional" or "additive". See 'Details'.
h
degree of differencing for Denton methods. See 'Details'.
start
(optional) start date. Similar to pre-processing the input series with window.
end
(optional) end date. Similar to pre-processing the input series with window.
...
additional arguments to be passed to the low level subfunctions.

Value

  • td returns an object of class "td".

    The function predict computes the interpolated high frequency series. If the high-frequency indicator series are longer than the low-frequency series, the resulting series will be extrapolated. The function coefficients extracts the coefficients. The function residuals extracts the low frequency residuals. The function summary prints a summary of the estimation.

    An object of class "td" is a list containing the following components:

  • valuesdisaggregated or interpolated (and extrapolated) high frequency series
  • fitted.valueslow frequency fitted values of the regression; low frequency indicator for the Denton methods.
  • ppreliminary high frequency series
  • residualslow-frequency residuals
  • rhoautoregressive parameter, $\rho$
  • truncatedlogical, whether $\rho$ has been truncated
  • coefficientsa named vector of coefficients
  • sestandard errors of the coefficients
  • s_2ML-estimator of the variance of the high-frequency residuals
  • s_2_glsGLS-estimator of the variance of the high-frequency residuals
  • tssweighted (low frequency) total sum of squares
  • rssweighted (low frequency) residual sum of squares
  • r.squaredR squared
  • adj.r.squaredadjusted R squared
  • logllog-likelihood
  • aicAkaike information criterion
  • bicSchwarz information criterion
  • ranknumber of right hand variables (including intercept)
  • dfdegrees of freedom
  • methodmethod of temporal disaggregation
  • callfunction call
  • namename of the low frequency variable
  • frthe ratio of high to low-frequency series
  • conversiontype of temporal conversion
  • actualactual values of the low frequeny series
  • modela matrix containing the indicators (and a constant if present)
  • criterionminimization criterion in Denton methods
  • horder of differencing in Denton methods

Details

td is used to disaggregate or interpolate a low frequency to a higher frequency time series, while either the sum, the average, the first or the last value of the resulting high-frequency series is consistent with the low frequency series. Disaggregation can be performed with or without the help of one or more indicator series. It can deal with all situations where the high frequency is an integer multiple of the low frequency (e.g. weeks to days), but not with irregular frequencies (e.g. weeks to months).

The selection of a temporal disaggregation model is similar to the selection of a linear regression model. Thus, td closely mirrors the working of the lm function. The left hand side of the formula denotes the low-frequency series, the right hand side the indicators. If no indicator is specified, the right hand side must be set equal to 1 (see examples). Unlike lm, td handles ts and mts time-series objects, as a typical application involves the use of these objects. Alternatively, If used with basic vectors, the to argument specifies the ratio between the high and the low frequency series.

For the generalized least squares (GLS) methods "chow-lin-maxlog", "chow-lin-minrss-ecotrim", "chow-lin-minrss-quilis", "litterman-maxlog" and "litterman-minrss", an autoregressive parameter $\rho$ is estimated. Default (and recommended) method is chow-lin-maxlog. With truncated.rho = 0 (default), it produces good results for a wide range of applications.

There are two variants of the chow-lin-minrss approach that lead to different results: Ecotrim by Barcellan (2003) uses a correlation matrix instead of the variance covariance matrix (implemented in "chow-lin-minrss-ecotrim"), the Matlab library by Quilis (2009) multiplies the correlation matrix with $1/(1-\rho^2)$ (implemented in "chow-lin-minrss-quilis").

The Denton methods "denton" and "denton-cholette" can be specified with one or without an indicator. The parameter h can be set equal to 0, 1, or 2. Depending on the value, the denton procedure minimizes the sum of squares of the deviations between the levels (0), the first differences (1) or the second differences (2) of the indicator and the resulting series. Additionally, criterion can be set equal to "proportional" or "additive", depending on whether the proportional or the absolute deviations should be considered for minimzation. "denton-cholette" removes the transient movement of the original "denton" method at the beginning of the resulting series.

"uniform" is a special case of the "denton" approach, with h equals 0 and criterion equals "proportional". It distributes the residuals uniformly. If no indicator is used, this leads to a step-shaped series.

"ols" performs an ordinary least squares regression (OLS) and distributes the residuals uniformly. It is especially useful for comparing the estimators of GLS and OLS regressions.

References

Chow, G. C., & Lin, A. L. (1971). Best linear unbiased interpolation, distribution, and extrapolation of time series by related series. The review of Economics and Statistics, 372-375.

Denton, F. T. (1971). Adjustment of monthly or quarterly series to annual totals: an approach based on quadratic minimization. Journal of the American Statistical Association, 66(333), 99-102.

Barcellan, R. (2003). ECOTRIM: a program for temporal disaggregation of time series, Workshop on Quarterly National Accounts, Eurostat.

Quilis, E. M. (2009). Matlab Temporal Disaggregation Library. URL: http://www.mathworks.com/matlabcentral/fileexchange/24438-temporal-disaggregation-library

See Also

ta for temporal aggregation, the inverse function of td.

summary is used to obtain and print a summary of the results.

predict is used to extract the disaggregated or interpolated high frequency series.

plot is used to plot the fitted and actual low frequency series, as well as the residuals.

Examples

Run this code
data(swisspharma)

# one indicator, no intercept
mod1 <- td(sales.a ~ 0 + exports.q)
summary(mod1)  # summary statistics
plot(mod1)  # residual plot of regression
plot(predict(mod1))

# interpolated quarterly series

# temporally aggregated series is equal to the annual value
all.equal(ta(predict(mod1), conversion = "sum", to = "annual"), sales.a)

# several indicators, including an intercept
mod2 <- td(sales.a ~ imports.q + exports.q)

# no indicator (Denton-Cholette)
mod3 <- td(sales.a ~ 1, to = "quarterly", method = "denton-cholette")

# no indicator (uniform)
mod4 <- td(sales.a ~ 1, to = "quarterly", method = "uniform")

# Example from Denton (1971), see references.
d.q <- ts(rep(c(50, 100, 150, 100), 5), frequency = 4)
d.a <- ts(c(500, 400, 300, 400, 500))

a1 <- predict(td(d.a ~ 0 + d.q, method = "denton",
                 criterion = "additive", h = 0))
a2 <- predict(td(d.a ~ 0 + d.q, method = "denton",
                 criterion = "additive", h = 1))
a3 <- predict(td(d.a ~ 0 + d.q, method = "denton",
                 criterion = "additive", h = 2))
a4 <- predict(td(d.a ~ 0 + d.q, method = "denton",
                 criterion = "additive", h = 3))

p1 <- predict(td(d.a ~ 0 + d.q, method = "denton",
                 criterion = "proportional", h = 0))
p2 <- predict(td(d.a ~ 0 + d.q, method = "denton",
                 criterion = "proportional", h = 1))
p3 <- predict(td(d.a ~ 0 + d.q, method = "denton",
                 criterion = "proportional", h = 2))
p4 <- predict(td(d.a ~ 0 + d.q, method = "denton",
                 criterion = "proportional", h = 3))

# Table in Denton (1971), page 101:
round(cbind(d.q, a1, a2, a3, a4, p1, p2, p3, p4))

Run the code above in your browser using DataLab