coef.ncpen {ncpen} | R Documentation |
ncpen
objectThe function returns the coefficients matrix for all lambda values.
## S3 method for class 'ncpen' coef(object, ...)
object |
(ncpen object) fitted |
... |
other S3 parameters. Not used. |
beta |
The coefficients matrix or list for |
Dongshin Kim, Sunghoon Kwon, Sangin Lee
Lee, S., Kwon, S. and Kim, Y. (2016). A modified local quadratic approximation algorithm for penalized optimization problems. Computational Statistics and Data Analysis, 94, 275-286.
### linear regression with scad penalty sam = sam.gen.ncpen(n=200,p=20,q=5,cf.min=0.5,cf.max=1,corr=0.5) x.mat = sam$x.mat; y.vec = sam$y.vec fit = ncpen(y.vec=y.vec,x.mat=x.mat) coef(fit) ### multinomial regression with classo penalty sam = sam.gen.ncpen(n=200,p=20,q=5,k=3,cf.min=0.5,cf.max=1,corr=0.5,family="multinomial") x.mat = sam$x.mat; y.vec = sam$y.vec fit = ncpen(y.vec=y.vec,x.mat=x.mat,family="multinomial",penalty="classo") coef(fit)