| denton | R Documentation |
Denton method relies on the principle of movement preservation. There exist a few variants corresponding to different definitions of movement preservation: additive first difference (AFD), proportional first difference (PFD), additive second difference (ASD), proportional second difference (PSD), etc. The default and most widely used is the Denton PFD method.
denton(
s = NULL,
t,
d = 1L,
mul = TRUE,
nfreq = 4L,
modified = TRUE,
conversion = c("Sum", "Average", "Last", "First", "UserDefined"),
obsposition = 1L,
nbcsts = 0L,
nfcsts = 0L
)
s |
A preliminary series. If not |
t |
The low-frequency aggregation constraint. It must be either a
|
d |
An integer specifying the differencing order. The default is |
mul |
Boolean. Indicates whether benchmarking is multiplicative
( |
nfreq |
An integer giving the annual frequency of the benchmarked series. This argument is used only when no preliminary series is provided. |
modified |
Boolean. Specifies whether the modified Denton method
( |
conversion |
A character string specifying the conversion mode,
typically |
obsposition |
An integer specifying the position of the observations of
the low-frequency constraint within the benchmarked series (e.g. the 7th
month of the year).
This argument is used only when |
nbcsts |
An integer specifying the number of backcast periods. This argument is ignored when a preliminary series is provided. (Not yet implemented.) |
nfcsts |
An integer specifying the number of forecast periods. This argument is ignored when a preliminary series is provided. (Not yet implemented.) |
A "ts" object with the benchmarked series is returned.
For more information on the method, its arguments, and the other methods available in the package, see the package vignette:
In R:
browseVignettes(package = "rjd3bench")
Online: https://rjdverse.github.io/rjd3bench/articles/rjd3bench.html
denton_raw() for benchmarking of atypical frequency series
Y <- rjd3toolkit::aggregate(rjd3toolkit::Retail$RetailSalesTotal, 1)
# Denton PFD without a preliminary series
y1 <- denton(t = Y, nfreq = 4)
print(y1)
# Denton PFD without a preliminary series and conversion = "Average"
denton(t = Y, nfreq = 4, conversion = "Average")
# Denton PFD with a preliminary series
x <- y1 + rnorm(n = length(y1), mean = 0, sd = 10000)
denton(s = x, t = Y)
# Denton AFD with a preliminary series
denton(s = x, t = Y, mul = FALSE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.