mcar_test: mcar_test

Description Usage Arguments Format Details Thankyous Warning

Description

mcar_test evaluates differences in expected mean or count according to a specified missing/non missing variable

Usage

1
mcar_test(data, y, factor.list)

Arguments

data

Dataset you are using.

y

The variable that you want to split the dataset into two parts dependent upon the missingness. This must be in quotes. E.g., "C1"

factor.list

Those variables that are factors. Must be in quotes. E.g., c("F1", "F2")

Format

Gives 4 dataframes: mcar.t.test.table - the results from the t-test mcar.chi2.table mcar.chi2.results - the results from the chi2 test mcar.chi2.ctab - the contingency table

Details

Prior to identifying structure in the data, it is useful to ask whether there is sufficient missingness to warrant such an investigation - and to try and determine whether the data is missing completely at random (MCAR). This can be done by splitting the data into two groups according to the presence or absence of a selected dependent variable, and to apply a t-test if the independent variables are continuous or a chi-square test if they are discrete, in order to determine equality of the means or the category probabilities, respectively. A Bonferroni adjustment (or similar) method can be used to allow for multiple tests. This mcar_test is based off of the test for whether data is completely missing at random, from Little(1988)

Thankyous

Special thanks to Dr. Nicole White for her help writing the initial code in early 2013

Warning

the data must contain only numerical values - No strings!


njtierney/mex documentation built on May 23, 2019, 8:22 p.m.