| denton_raw | 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. The denton_raw()
function extends denton() by allowing benchmarking for any frequency ratio.
denton_raw(
s = NULL,
t,
freqratio,
d = 1L,
mul = TRUE,
modified = TRUE,
conversion = c("Sum", "Average", "Last", "First", "UserDefined"),
obsposition = 1L,
startoffset = 0L,
nbcsts = 0L,
nfcsts = 0L
)
s |
A preliminary series. If not |
t |
The low-frequency aggregation constraint. It must be a numeric vector. |
freqratio |
An integer specifying the frequency ratio between the benchmarked series and the low-frequency constraint. This argument is mandatory and must be a positive integer. |
d |
An integer specifying the differencing order. The default is |
mul |
Boolean. Indicates whether benchmarking is multiplicative
( |
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 |
startoffset |
The number of initial observations in the preliminary series that precede the start of the low-frequency constraint. The value must be either 0 or a positive integer (default is 0). This argument is ignored when no preliminary series is provided. |
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 numeric vector 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
Y <- c(500,510,525,520)
x <- c(97, 98, 98.5, 99.5, 104,
99, 100, 100.5, 101, 105.5,
103, 104.5, 103.5, 104.5, 109,
104, 107, 103, 108, 113,
110)
# Denton PFD
# for example, x and Y could be annual and quinquennal series respectively
denton_raw(x, Y, freqratio = 5)
# Denton AFD
denton_raw(x, Y, freqratio = 5, mul = FALSE)
# Denton PFD without indicator
denton_raw(t = Y, freqratio = 2, conversion = "Average")
# Denton PFD with/without an offset and conversion = "Last"
x2 <- c(485,
490, 492.5, 497.5, 520, 495,
500, 502.5, 505, 527.5, 515,
522.5, 517.5, 522.5, 545, 520,
535, 515, 540, 565, 550)
denton_raw(x2, Y, freqratio = 5, conversion = "Last")
denton_raw(x2, Y, freqratio = 5, conversion = "Last", startoffset = 1)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.