search for: hrlnm

Displaying 1 result from an estimated 1 matches for "hrlnm".

Did you mean: hren
2011 May 01
1
Different results of coefficients by packages penalized and glmnet
Dear R users: Recently, I learn to use penalized logistic regression. Two packages (penalized and glmnet) have the function of lasso. So I write these code. However, I got different results of coef. Can someone kindly explain. # lasso using penalized library(penalized) pena.fit2<-penalized(HRLNM,penalized=~CN+NoSus,lambda1=1,model="logistic",standardize=TRUE) pena.fit2 coef(pena.fit2) opt<-optL1(HRLNM,penalized=~CN+NoSus,fold=5) opt$lambda coef(opt$fullfit) prof<-profL1(HRLNM,penalized=~CN+NoSus,fold=opt$fold,steps=20) plot(prof$lambda, prof$cvl, type="l") plotpat...