pool_D4: Pools the Likelihood Ratio tests across Multiply Imputed...

View source: R/pool_D4.R

pool_D4R Documentation

Pools the Likelihood Ratio tests across Multiply Imputed datasets ( method D4)

Description

pool_D4 The D4 statistic to combine the likelihood ratio tests (LRT) across Multiply Imputed datasets according method D4.

Usage

pool_D4(data, nimp, impvar, fm0, fm1, robust = TRUE, model_type = "binomial")

Arguments

data

Data frame with stacked multiple imputed datasets. The original dataset that contains missing values must be excluded from the dataset. The imputed datasets must be distinguished by an imputation variable, specified under impvar, and starting by 1.

nimp

A numerical scalar. Number of imputed datasets. Default is 5.

impvar

A character vector. Name of the variable that distinguishes the imputed datasets.

fm0

the null model.

fm1

the (nested) model to compare. Must be larger than the null model.

robust

if TRUE a robust LRT is used (algorithm 1 in Chan and Meng), otherwise algorithm 2 is used.

model_type

if TRUE (default) a logistic regression model is fitted, otherwise a linear regression model is used

Value

The D4 statistic, the numerator, df1 and denominator, df2 degrees of freedom for the F-test.

Author(s)

Martijn Heymans, 2021

References

Chan, K. W., & Meng, X.-L. (2019). Multiple improvements of multiple imputation likelihood ratio tests. https://arxiv.org/abs/1711.08822

Grund, Simon, Oliver Lüdtke, and Alexander Robitzsch. 2021. “Pooling Methods for Likelihood Ratio Tests in Multiply Imputed Data Sets.” PsyArXiv. January 29. doi:10.31234/osf.io/d459g.

Examples


fm0 <- Chronic ~ BMI + factor(Carrying) +
  Satisfaction + SocialSupport + Smoking
fm1 <- Chronic ~ BMI + factor(Carrying) +
  Satisfaction +  SocialSupport + Smoking +
  Radiation

miceafter::pool_D4(data=lbpmilr, nimp=10, impvar="Impnr",
               fm0=fm0, fm1=fm1, robust = TRUE)


miceafter documentation built on Oct. 2, 2022, 5:08 p.m.