threeRuleSmooth {disaggR} | R Documentation |
threeRuleSmooth bends a time series with a time series of a lower frequency. The procedure involved is a proportional Denton benchmark.
Therefore, the resulting time series is the product of the high frequency input with a smoothed rate. This latter is extrapolated through an arithmetic sequence.
The resulting time series is equal to the low-frequency series after aggregation within the benchmark window.
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,
...
)
hfserie |
the bended time series. It can be a matrix time series. |
lfserie |
a time series whose frequency divides the frequency of
|
start.benchmark |
an optional start for |
end.benchmark |
an optional end for |
start.domain |
an optional start of the output high-frequency series. 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 |
end.domain |
an optional end of the output high-frequency series. 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.
It is required as a common difference for the arithmetical extrapolation of
the rate.
Should be a numeric of length 1 or 2, like a window for |
end.delta.rate |
an optional end for the mean of the rate difference.
It is required as a common difference for the arithmetical extrapolation of
the rate.
Should be a numeric of length 1 or 2, like a window for |
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. |
In order to smooth the rate, threeRuleSmooth calls bflSmooth and uses a modified and extrapolated version of hfserie as weights :
only the full cycles are kept
the first and last full cycles are replicated respectively backwards and forwards to fill the domain window.
threeRuleSmooth returns an object of class "threeRuleSmooth"
.
The functions plot
and autoplot
(the generic from ggplot2) produce
graphics of the benchmarked series and the bending series.
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 series, that is the result of the benchmark. |
lfrate |
a time series, 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 low-frequenccy rate time series. 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. |
## How to use threeRuleSmooth
smooth <- threeRuleSmooth(hfserie = turnover,
lfserie = construction)
as.ts(smooth)
coef(smooth)
summary(smooth)
library(ggplot2)
autoplot(in_disaggr(smooth))