Wrapper.Glmnet: Wrapper function for using glmnet

Description Usage Arguments Value See Also

Description

This function is a wrapper for choosing the bandwidth in glmnet and then predicting using this choice.

Usage

1
2
Wrapper.Glmnet(alphaval, Xdata, ydata, Xnewdata, mu,
               prediction = TRUE, include.intercept = 1) 

Arguments

alphaval

The choice of alpha in glmnet. 0 corresponds to the Lasso, 1 to ridge.

Xdata

The design matrix. Inclusion of a constant vector is not necessary.

ydata

The response vector.

Xnewdata

The data to use for prediction.

mu

The true mean vector to use for computing MSE of predictions.

prediction

If predictions should be evaluated (and not beta).

include.intercept

If intercept.

Value

Returns a scalar value with the MSE of the prediction of the mean vector.

See Also

glmnet, cv.glmnet.


sebastianandersson/FMA documentation built on May 29, 2019, 4:57 p.m.