estimation: 2 step procedure: Variable selection and estimation and...

Description Usage Arguments Value Examples

View source: R/estimation.R

Description

Implements hierarchical variable selection and plain lasso (glmnet) selection. The hierarchy comes from SPAMS paper (to be described). Gives beta for different lags. The second step is also implemented here.

Usage

1
estimation(X.shift, Y.single, Y.shift, lagX)

Arguments

X.shift

a matrix. Shifted X matrix

Y.single

a vector. Response vector

Y.shift

a matrix. Shifted response vector (for second step)

lagX

a number. Lags of X to be estimated. In our example it's 2,3 or 5

Value

a list of components

beta.hat

Estimated regression coefficients for specified lags, using hierarchical penalty

beta.lasso

Estimated regression coefficients for specified lags using lasso

phi.hat

Estimated AR coefficients for residual fitting

beta.refit

Combination of phi and beta

Examples

1
2
3
4
modelsimple <- estimation(X.shift = DATsimple$Xtr,
Y.single = DATsimple$Ytr.single,
Y.shift = DATsimple$Ytr,
lagX = parameter.of.estimation$lag.to.estX)

yymmhaha/PackPaper1 documentation built on May 24, 2019, 8:55 a.m.