denton_raw: Benchmarking of an Atypical Frequency Series by means of the...

View source: R/benchmark.R

denton_rawR Documentation

Benchmarking of an Atypical Frequency Series by means of the Denton Method.

Description

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.

Usage

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
)

Arguments

s

A preliminary series. If not NULL, it must be a numeric vector.

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 1.

mul

Boolean. Indicates whether benchmarking is multiplicative (TRUE) or additive (FALSE). The default is multiplicative.

modified

Boolean. Specifies whether the modified Denton method (TRUE) or the unmodified Denton method (FALSE) is applied. The default is TRUE.

conversion

A character string specifying the conversion mode, typically "Sum" (the default) or "Average". Other options are: "Last", "First" and "UserDefined".

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 conversion = "UserDefined".

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

Value

A numeric vector with the benchmarked series is returned.

Vignette

For more information on the method, its arguments, and the other methods available in the package, see the package vignette:

Examples


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)



rjd3bench documentation built on Nov. 26, 2026, 5:08 p.m.