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

Description Usage Arguments Value Examples

View source: R/rubin_analysis.R

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

1
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

1
2
3
4
5
6
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 Jan. 30, 2021, 9:05 a.m.