nonzero.coef {glmpathcr} | R Documentation |
Extract Non-Zero Model Coefficients
Description
The nonzero.coef
function returns only those non-zero coefficient estimates for a selected model.
Usage
nonzero.coef(object, s)
Arguments
object |
a |
s |
the step at which the non-zero coefficient estimates are desired |
Value
A vector of estimated coefficients is returned. The nonzero.coef
function returns only those non-zero coefficient estimates for a selected model.
Author(s)
Kellie J. Archer, archer.43@osu.edu
See Also
See also as glmpathcr
, coef.glmpathcr
Examples
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)
[Package glmpathcr version 1.0.10 Index]