50% off | Unlimited Data & AI Learning

Last chance! 50% off unlimited learning

Sale ends in


sentometrics (version 1.0.1)

weights_almon: Compute Almon polynomials

Description

Computes Almon polynomial weighting curves. Handy to self-select specific time aggregation weighting schemes for input in ctr_agg using the weights argument.

Usage

weights_almon(n, orders = 1:3, do.inverse = TRUE, do.normalize = TRUE)

Value

A data.frame of all Almon polynomial weighting curves, of size length(orders) (times two if do.inverse = TRUE).

Arguments

n

a single numeric to indicate the lag length (cf., n).

orders

a numeric vector as the sequence of the Almon orders (cf., r). The maximum value corresponds to R.

do.inverse

TRUE if the inverse Almon polynomials should be calculated as well.

do.normalize

a logical, if TRUE weights are normalized to unity.

Details

The Almon polynomial formula implemented is: (1(1i/n)r)(1i/n)Rr, where i is the lag index ordered from 1 to n. The inverse is computed by changing i/n to 1i/n.

See Also

ctr_agg