dynr.mi: Multiple Imputation of dynrModel objects

View source: R/dynrMi.R

dynr.miR Documentation

Multiple Imputation of dynrModel objects

Description

Multiple Imputation of dynrModel objects

Usage

dynr.mi(dynrModel, which.aux = NULL, which.lag = NULL, lag = 0,
  which.lead = NULL, lead = 0, m = 5, iter = 5, imp.obs = FALSE,
  imp.exo = TRUE, diag = TRUE, Rhat = 1.1, conf.level = 0.95,
  verbose = TRUE, seed = NA)

Arguments

dynrModel

dynrModel object. data and model setup

which.aux

character. names of the auxiliary variables used in the imputation model

which.lag

character. names of the variables to create lagged responses for imputation purposes

lag

integer. number of lags of variables in the imputation model

which.lead

character. names of the variables to create leading responses for imputation purposes

lead

integer. number of leads of variables in the imputation model

m

integer. number of multiple imputations

iter

integer. number of MCMC iterations in each imputation

imp.obs

logical. flag to impute the observed dependent variables

imp.exo

logical. flag to impute the exogenous variables

diag

logical. flag to use convergence diagnostics

Rhat

numeric. value of the Rhat statistic used as the criterion in convergence diagnostics

conf.level

numeric. confidence level used to generate confidence intervals

verbose

logical. flag to print the intermediate output during the estimation process

seed

integer. random number seed to be used in the MI procedure

Details

See the demo, demo(package='dynr', 'MILinearDiscrete'), for an illustrative example of using dynr.mi to implement multiple imputation with a vector autoregressive model.

Value

an object of ‘dynrMi’ class that is a list containing: 1. the imputation information, including a data set containing structured lagged and leading variables and a ‘mids’ object from mice() function; 2. the diagnostic information, including trace plots, an Rhat plot and a matrix containing Rhat values; 3. the estimation results, including parameter estimates, standard error estimates and confidence intervals.

References

Ji, L., Chow, S-M., Schermerhorn, A.C., Jacobson, N.C., & Cummings, E.M. (2018). Handling Missing Data in the Modeling of Intensive Longitudinal Data. Structural Equation Modeling: A Multidisciplinary Journal, 1-22.

Yanling Li, Linying Ji, Zita Oravecz, Timothy R. Brick, Michael D. Hunter, and Sy-Miin Chow. (2019). dynr.mi: An R Program for Multiple Imputation in Dynamic Modeling. International Journal of Computer, Electrical, Automation, Control and Information Engineering, 13, 302-311.


dynr documentation built on May 29, 2024, 2:49 a.m.