threeRuleSmooth {disaggR}R Documentation

Bends a time-serie with a lower frequency one by smoothing their rate

Description

threeRuleSmooth bends a time-serie with a time-serie of a lower frequency. The procedure involved is a proportional Denton benchmark.

Therefore, the resulting time-serie is the product of the high-frequency input with a smoothed rate. This latter is extrapolated using an arithmetic sequence.

The resulting time-serie is equal to the low-frequency serie after aggregation within the benchmark window.

Usage

threeRuleSmooth(
  hfserie,
  lfserie,
  start.benchmark = NULL,
  end.benchmark = NULL,
  start.domain = NULL,
  end.domain = NULL,
  start.delta.rate = NULL,
  end.delta.rate = NULL,
  set.delta.rate = NULL,
  ...
)

Arguments

hfserie

the bended time-serie. It can be a matrix time-serie.

lfserie

a time-serie whose frequency divides the frequency of hfserie.

start.benchmark

an optional start for lfserie to bend hfserie. Should be a numeric of length 1 or 2, like a window for lfserie. If NULL, the start is defined by lfserie's window.

end.benchmark

an optional end for lfserie to bend hfserie. Should be a numeric of length 1 or 2, like a window for lfserie. If NULL, the start is defined by lfserie's window.

start.domain

an optional start of the output high-frequency serie. It also defines the smoothing window : The low-frequency residuals will be extrapolated until they contain the smallest low-frequency window that is around the high-frequency domain window. Should be a numeric of length 1 or 2, like a window for hfserie. If NULL, the start is defined by hfserie's window.

end.domain

an optional end of the output high-frequency serie. It also defines the smoothing window : The low-frequency residuals will be extrapolated until they contain the smallest low-frequency window that is around the high-frequency domain window.

start.delta.rate

an optional start for the mean of the rate difference required for the arithmetical extrapolation of the rate. Should be a numeric of length 1 or 2, like a window for lfserie. If NULL, the start is defined by lfserie's window.

end.delta.rate

an optional end for the mean of the rate difference required for the arithmetical extrapolation of the rate. Should be a numeric of length 1 or 2, like a window for lfserie. If NULL, the end is defined by lfserie's window.

set.delta.rate

an optional double, that allows the user to set the delta mean instead of using a mean.

...

if the dots contain a cl item, its value overwrites the value of the returned call. This feature allows to build wrappers.

Details

In order to smooth the rate, threeRuleSmooth calls bflSmooth and uses a modified and extrapolated version of hfserie as weights :

Therefore, the weighted means of the smoothed rate are equal to the low-frequency rate.

Value

threeRuleSmooth returns an object of class "threeRuleSmooth".

The functions plot and autoplot (the generic from ggplot2) produce graphics of the benchmarked serie and the bending serie. The functions in_disaggr, in_revisions, in_scatter produce various comparisons on which plot and autoplot can also be used.

The generic accessor functions as.ts, model.list, smoothed.rate extract various useful features of the returned value.

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

benchmarked.serie

a time-serie, that is the result of the benchmark.

lfrate

a time-serie, that is the low-frequency rate of the threeRuleSmooth.

smoothed.rate

the smoothed rate of the threeRuleSmooth.

hfserie.as.weights

the modified and extrapolated hfserie (see details).

delta.rate

the low-frequency delta of the rate, used to extrapolate the rate time-serie. It is estimated as the mean value in the specified window.

model.list

a list containing all the arguments submitted to the function.

call

the matched call.

Examples


## How to use threeRuleSmooth

smooth <- threeRuleSmooth(hfserie = turnover,
                          lfserie = construction)
as.ts(smooth)
coef(smooth)
summary(smooth)
library(ggplot2)
autoplot(in_disaggr(smooth))


[Package disaggR version 1.0.1 Index]