
Last chance! 50% off unlimited learning
Sale ends in
Lag shape constructors to be used in model formulas.
ecq(x, a, b, x.group = NULL, nlag = NULL)
qd(x, a, b, x.group = NULL, nlag = NULL)
ld(x, a, b, x.group = NULL, nlag = NULL)
gam(x, a, b, x.group = NULL, nlag = NULL)
The name of the variable.
The shape parameters.
The number of lags considered. If NULL
or more than 2/3 of the sample size, it is set equal to 2/3 of the sample size.
The name of the group factor (optional).
A. Magrini (2020). A family of theory-based lag shapes for distributed-lag linear regression. To be appeared on Italian Journal of Applied Statistics.
# NOT RUN {
data(industry)
# example in linear regression
m1 <- lm(Consum ~ -1+Region+ecq(Job,0,5,x.group=Region), data=industry)
m2 <- lm(Consum ~ -1+Region+gam(Job,0.85,0.2,x.group=Region), data=industry)
# }
Run the code above in your browser using DataLab