Skip to content

Instantly share code, notes, and snippets.

@scolwell
Last active May 20, 2019 19:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save scolwell/d173f6948dfbaecb9bb49dbe580e466d to your computer and use it in GitHub Desktop.
Save scolwell/d173f6948dfbaecb9bb49dbe580e466d to your computer and use it in GitHub Desktop.
Power Analysis of Simple Mediation using Mplus
MONTECARLO:
names = x m y;
nobs = 200;
nreps = 1000;
MODEL POPULATION:
x@1; m@1; y@1;
y on m*.2 x*.2;
m on x*.2;
MODEL:
y on m*.2 x*.2;
m on x*.2;
MODEL INDIRECT:
y IND m x;
output: tech9;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment