Takes multiply imputed datasets (as generated by the extract_MIdata() function) and runs an analysis function on each of them.

miAnalyze(formula, family = NULL, data, pool = TRUE)

Arguments

formula

a two sided model formula (see formula).

family

only for glm: a description of the distribution and link function to be used in the model. This can be a character string naming a family function, a family function or the result of a call to a family function. (For more details see below and family.)

data

the output object of extract_MIdata() function.

pool

logical. If TRUE, estimates from each imputed data set will be pooled together according to Rubin's rules. Default is TRUE.

Value

A list containing

  • list of estimated coefficients and standard error from each imputed data.

  • pooled estimates based Rubin's rule if pool = TRUE.

Details

rubin_rules applies Rubin's rules (Rubin, 1987) for pooling together the results from a multiple imputation procedure. The pooled point Estimate is is the average across the point estimates from the complete-data analyses. The SE is the square-root of the sum of two terms representing the within-variance and the between-variance (see Little-Rubin (2002)). The function also returns 95% confidence interval, based on the estimated pooled degrees of freedom that can be used for inference based on the t-distribution.