coef.compCL {Compack} | R Documentation |
"compCL"
object.gets the coefficients at the requested values for lam
from a fitted
"compCL"
object.
## S3 method for class 'compCL' coef(object, s = NULL, ...)
object |
fitted |
s |
value(s) of the penalty parameter |
... |
Not used. |
s
is a vector of lambda values at which the coefficients are requested. If s
is not in the
lam
sequence used for fitting the model, the coef
function will use linear
interpolation, so the function should be used with caution.
The coefficients at the requested tuning parameter values in s
.
Zhe Sun and Kun Chen
Lin, W., Shi, P., Peng, R. and Li, H. (2014) Variable selection in regression with compositional covariates, https://academic.oup.com/biomet/article/101/4/785/1775476. Biometrika 101 785-979.
compCL
and predict
,
plot
and print
methods
for "compCL"
object.
Comp_data = comp_Model(n = 50, p = 30) Comp_fit = compCL(y = Comp_data$y, Z = Comp_data$X.comp, Zc = Comp_data$Zc, intercept = Comp_data$intercept) coef(Comp_fit) coef(Comp_fit, s = Comp_fit$lam[50]) coef(Comp_fit, s = c(1, 0.5, 0.1))