Description Usage Arguments Details Author(s) References See Also Examples
Print short summary of results of Cyclic Coordinate Descent for L2 Regression. Includes number of cases and predictors, lambda used, estimate of coeffcients produced, the number of selected predictors, and the names of selected predictors.
1 2 |
x |
Output of l2.reg. Must be of class "l2.reg" |
... |
N/A |
print.L1_REG
produces selected output from l2.reg. For more output, see summary.l2.reg.
Edward Grant, Kenneth Lange, Tong Tong Wu
Maintainer: Edward Grant edward.m.grant@gmail.com
Wu, T.T. and Lange, K. (2008). Coordinate Descent Algorithms for Lasso Penalized Regression. Annals of Applied Statistics, Volume 2, No 1, 224-244.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | set.seed(100)
n=500
p=2000
nzfixed = c(1:5)
true.beta<-rep(0,p)
true.beta[nzfixed] = c(1,1,1,1,1)
x=matrix(rnorm(n*p),p,n)
y = t(x) %*% true.beta
rownames(x)<-1:nrow(x)
colnames(x)<-1:ncol(x)
#Lasso penalized L2 regression
out<-l2.reg(x,y,lambda=2)
#Re-estimate parameters without penalization
out2<-l2.reg(x[out$selected,],y,lambda=0)
print(out2)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.