combine: Estimate and combine regression models from multiply-imputed...

View source: R/rubin_analysis.R

combineR Documentation

Estimate and combine regression models from multiply-imputed data

Description

combine() calculates m individual regression models, then applies "Rubin's Rules" to produce a single, combined estimate of the regression parameters and uncertainty.

Usage

combine(formula, df_list, dof_adjust = TRUE, ...)

Arguments

formula

A formula, or character string coercible to a formula

df_list

A list, containing data.frames or objects coercible to data.frames

dof_adjust

Boolean, indicating whether or not to apply the Rubin and Barnard (1999) degrees of freedom adjustment for small-samples

...

Further arguments passed onto glm()

Value

Data.frame of combined model results.

Examples

set.seed(89)
test_dfs <- lapply(1:5, function (x) data.frame(a = rnorm(1000),
                                                b = runif(1000),
                                                c = 2*rnorm(1000)))

midas_res <- combine("a ~ b + c", df_list = test_dfs)

rMIDAS documentation built on Oct. 11, 2023, 5:14 p.m.