Skip to contents

Normal Theory Maximum Likelihood Estimation

This is the Mplus code deployed by FitModelML(). Note that FitModelMI() used FitModelML() to fit the model on each of the imputed data sets.

DATA:
        FILE = data.dat;
VARIABLE:
        NAMES = X M Y;
        USEVARIABLES = X M Y;
        MISSING = ALL (-999);
ANALYSIS:
        TYPE = GENERAL;
        ESTIMATOR = ML;
MODEL:
        Y ON X;
        Y ON M (B);
        M ON X (A);
        X WITH X;
SAVEDATA:
        RESULTS ARE results.out;
        TECH3 IS tech3.out;

Nonparametric Bootstrap Confidence Intervals

This is the Mplus code deployed by NBML().

DATA:
        FILE = data.dat;
VARIABLE:
        NAMES = X M Y;
        USEVARIABLES = X M Y;
        MISSING = ALL (-999);
ANALYSIS:
        TYPE = GENERAL;
        ESTIMATOR = ML;
        BOOTSTRAP = 5000;
MODEL:
        Y ON X;
        Y ON M (B);
        M ON X (A);
        X WITH X;
MODEL CONSTRAINT:
        NEW(AB);
        AB = A*B;
OUTPUT:
        CINT(bootstrap);   ! percentile
      ! CINT(bcbootstrap); ! bias-corrected 

Multiple Imputation

This is the Mplus code deployed by ImputeData().

DATA:
        FILE = data.dat;
VARIABLE:
        NAMES = X M Y;
        USEVARIABLES = X M Y;
        MISSING = ALL (-999);
ANALYSIS:
        TYPE = BASIC;
DATA IMPUTATION:
        IMPUTE = X M Y;
        NDATASETS = 100;
        SAVE = mi*.dat;

References

Muthen, L. K., & Muthen, B. O. (2017). Mplus user’s guide. Eighth edition. Los Angeles, CA, Muthen & Muthen.