Description Usage Arguments Value Examples
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.
1 | estimation(X.shift, Y.single, Y.shift, lagX)
|
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 |
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 |
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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.