View source: R/Fit_mult_impute_observed_outcome.R
fit_mult_impute_obs_outcome | R Documentation |
This function is a wrapper for fitting models with Hmisc::fit.mult.impute()
on a
multiply imputed dataset generated with mice::mice()
. Cases with a
missing outcome in the original dataset are removed from the mids object
by using the "subset" argument in Hmisc::fit.mult.impute()
.
fit_mult_impute_obs_outcome(mids, formula, fitter, ...)
mids |
a mids object, i.e. the imputed dataset. |
formula |
a formula that describes the model to be fit. The outcome (y variable) in the formula will be used to remove missing cases. |
fitter |
a modeling function (not in quotes) that is compatible with
|
... |
additional arguments to |
mod a fit.mult.impute object.
Till D. Best
# create an imputed dataset
imputed_data <- mice::mice(airquality)
fit_mult_impute_obs_outcome(mids = imputed_data, formula = Ozone ~ Solar.R + Wind, fitter = glm)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.