nonzero.coef | R Documentation |
The nonzero.coef
function returns only those non-zero coefficient estimates for a selected model.
nonzero.coef(object, s)
object |
a |
s |
the step at which the non-zero coefficient estimates are desired |
A vector of estimated coefficients is returned. The nonzero.coef
function returns only those non-zero coefficient estimates for a selected model.
Kellie J. Archer, archer.43@osu.edu
See also as glmpathcr
, coef.glmpathcr
data(diabetes)
x <- diabetes[, 2:dim(diabetes)[2]]
y <- diabetes$y
fit <- glmpathcr(x, y)
step <- model.select(fit, which="BIC")
nonzero.coef(fit, s = step)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.