ecq: Lag shape constructors

Description Usage Arguments References Examples

View source: R/dlsem.r

Description

Lag shape constructors to be used in model formulas.

Usage

1
2
3
4
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)

Arguments

x

The name of the variable.

a, b

The shape parameters.

nlag

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.

x.group

The name of the group factor (optional).

References

A. Magrini (2020). A family of theory-based lag shapes for distributed-lag linear regression. To be appeared on Italian Journal of Applied Statistics.

Examples

1
2
3
4
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)

dlsem documentation built on April 17, 2020, 1:14 a.m.