linear_lag: Function to obtain linearly decaying weights

linear_lagR Documentation

Function to obtain linearly decaying weights

Description

This function generates linearly decaying weights which are subsequently used inside of get_weighted_lags. To be passed to hhh4_lag or profile_par_lag as the control$funct_lag argument. There are different ways of specifying linearly decaying weights, the version implemented here is

u0_q = max(1 - mq, 0)

and u_q = u0_q / sum_{q = 1}^Q u0_q for q = 1, ..., Q.

Usage

linear_lag(par_lag, min_lag, max_lag)

Arguments

par_lag

a parameter to steer the lag structure, here logit(m) where m is the linear decay factor; see details of hhh4lag or profile_par_lag.

min_lag

smallest lag to include; the support of the Poisson form starts only at min_lag. Defaults to 1.

max_lag

highest lag to include; higher lags are cut off and he remaining weights standardized. Defaults to 5.


jbracher/hhh4addon documentation built on Feb. 16, 2024, 1:45 a.m.