Plot.coef.glmnet {c060} | R Documentation |
Creates several plots showing the coefficient path for the final model of a cv.glmnet fit and highlights the path of a pre-specified set of variables within the coefficient path.
Plot.coef.glmnet(cvfit, betas)
cvfit |
an object of class "cv.glmnet" as returned by the function |
betas |
a vector of names of variables; must be a subset of rownames(coef(cvfit)). |
a list of four objects
stable |
a vector giving the positions of the estimated stable variables |
lambda |
the penalization parameter used for the stability selection |
lpos |
the position of the penalization parameter in the regularization path |
error |
the desired type I error level w.r.t. to the chosen type I error rate |
type |
the type I error rate |
Manuela Zucknick \ m.zucknick@dkfz-heidelberg.de
Sill M., Hielscher T., Becker N. and Zucknick M. (2014), c060: Extended Inference with Lasso and Elastic-Net Regularized Cox and Generalized Linear Models, Journal of Statistical Software, Volume 62(5), pages 1–22. http://www.jstatsoft.org/v62/i05/
## Not run: set.seed(1010) n=1000;p=100 nzc=trunc(p/10) x=matrix(rnorm(n*p),n,p) beta=rnorm(nzc) fx= x[,seq(nzc)] %*% beta eps=rnorm(n)*5 y=drop(fx+eps) px=exp(fx) px=px/(1+px) ly=rbinom(n=length(px),prob=px,size=1) set.seed(1011) cvob1=cv.glmnet(x,y) Plot.coef.glmnet(cvob1, c("V1","V100")) ## End(Not run)