mi_comb: combine multiple imputatiton results

Description Usage Arguments Details Value See Also Examples

View source: R/mi_comb.R

Description

combines multiple imputation results

Usage

1
mi_comb(dt, level = c(1, 2), phat, var_phat)

Arguments

dt

dataframe/tibble of summaized estimates of parameter of interest per imputation

level

factor, Default: c(1, 2), specifies if the imputation was performed at one-stage (level=1), or two-stages (level=2)

phat

numeric, column of estimates for parameter of interest

var_phat

numeric, column of estimates of variance of phat

Details

DETAILS

Value

tibble

See Also

sym cor

Examples

1
2
3
4
5
6
dt <- tibble::tibble(y = rbinom(100,1,0.6))
dt$y.m <- c(rep(NA, 10), dt$y[11:100])
dt$r <- ifelse(is.na(dt$y.m)==TRUE, 1, 0)
dt_mi <- mi(dt, 5)
dt_mi$phat_var <- dt_mi$phat*(1 - dt_mi$phat)/dt_mi$n_obs
mi_comb(dt_mi, level = 1, 'phat', 'phat_var')

yuliasidi/bin2mi documentation built on March 11, 2021, 8:10 p.m.