weights_exponential: Compute exponential weighting curves

Description Usage Arguments Value See Also

View source: R/utils.R

Description

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

Usage

1
2
3
4
5
6
weights_exponential(
  n,
  alphas = seq(0.1, 0.5, by = 0.1),
  do.inverse = FALSE,
  do.normalize = TRUE
)

Arguments

n

a single numeric to indicate the lag length.

alphas

a numeric vector of decay factors, between 0 and 1, but multiplied by 10 in the implementation.

do.inverse

TRUE if the inverse exponential curves should be calculated as well.

do.normalize

a logical, if TRUE weights are normalized to unity.

Value

A data.frame of exponential weighting curves per value of alphas.

See Also

ctr_agg


SentometricsResearch/sentometrics documentation built on Aug. 20, 2021, 5:31 p.m.