Description Usage Arguments Author(s) See Also Examples
Input a glmnet object and output a formatted ggplot result of the coefficients.
1 |
fit |
object of class 'glmnet' |
beta |
class dgCMatrix from extracting coefficients from model fit |
intercept |
string indicating name of intercept in model results |
Margaret L. Hannum
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | ## Not run:
## Gaussian
x = matrix(rnorm(100 * 20), 100, 20)
y = rnorm(100)
fit1 = glmnet(x, y)
ggglmnet(fit1, coef(fit1), intercept = "(Intercept)")
## multinomial
g4 = sample(1:4, 100, replace = TRUE)
fit3 = glmnet(x, g4, family = "multinomial")
# plot coefficients for first level of multinomial endpoint
ggglmnet(fit3, coef(fit3)$`1`, intercept = "")
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.