Description Usage Arguments Value References
Not typically called by the user directly; called indirectly via other functions. Uses glmnet
to fit a ridge regression with penalty chosen by cross-validation. Returns fitted values for the data in to_predict
.
1 |
data |
Data frame containing the observed data |
model_formula |
A model formula object for the ridge regression to be fitted |
to_predict |
Data frame containing observations for which predictions are to be made. If NULL, defaults to the same as |
A list containing a glmnet
model object fit
and a vector fitted
of fitted values for observations in to_predict
.
Lundberg I (2021). "The gap-closing estimand: A causal approach to study interventions that close disparities across social categories." Sociological Methods and Research. Available at https://osf.io/gx4y3/.
Friedman J, Hastie T, Tibshirani R (2010). "Regularization Paths for Generalized Linear Models via Coordinate Descent." Journal of Statistical Software, 33(1), 1–22. https://www.jstatsoft.org/htaccess.php?volume=33&type=i&issue=01.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.