fit_ridge: Ridge regression estimator

Description Usage Arguments Value References

View source: R/fit_ridge.R

Description

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.

Usage

1
fit_ridge(data, model_formula, to_predict)

Arguments

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 data.

Value

A list containing a glmnet model object fit and a vector fitted of fitted values for observations in to_predict.

References

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.


gapclosing documentation built on Oct. 11, 2021, 9:07 a.m.