Mplus VERSION 8.8
MUTHEN & MUTHEN
04/19/2022 10:30 PM
INPUT INSTRUCTIONS
Title: analyzing the ex9.30step1 data
which has missing data.
Not using Tinterval
analyzing/saving not missing observations
by commenting out missing= and using Useobs
and not using Lagged so that y&1 is not saved
Data:
file = ex9.30step1.dat;
Variable:
names = u z y w time subject;
! don't read y-lag because then all records have missing
usev = z y w;
! missing = all(999);
cluster = subject;
between = z w;
! lagged = y(1);
! Tinterval = time(1);
useobs = y ne 999;
auxiliary = time;
ANALYSIS:
TYPE = twolevel RANDOM;
estimator=bayes;
proc=2;
biter=(1000);
MODEL: ! just apply a simple model:
%WITHIN%
y;
%BETWEEN%
y on w;
z on y;
Output:
tech1 tech8;
Plot:
type = plot3;
Savedata: ! this will be the "real data":
file = ex9.30.dat;
*** WARNING in MODEL command
TYPE=RANDOM is used to declare random effect variables in the model.
No random effect variables were found. TYPE=RANDOM will be ignored.
1 WARNING(S) FOUND IN THE INPUT INSTRUCTIONS
analyzing the ex9.30step1 data
which has missing data.
Not using Tinterval
analyzing/saving not missing observations
by commenting out missing= and using Useobs
and not using Lagged so that y&1 is not saved
SUMMARY OF ANALYSIS
Number of groups 1
Number of observations 9994
Number of dependent variables 2
Number of independent variables 1
Number of continuous latent variables 0
Observed dependent variables
Continuous
Z Y
Observed independent variables
W
Observed auxiliary variables
TIME
Variables with special functions
Cluster variable SUBJECT
Between variables
Z W
Estimator BAYES
Specifications for Bayesian Estimation
Point estimate MEDIAN
Number of Markov chain Monte Carlo (MCMC) chains 2
Random seed for the first chain 0
Starting value information UNPERTURBED
Algorithm used for Markov chain Monte Carlo GIBBS(PX1)
Convergence criterion 0.500D-01
Maximum number of iterations 50000
K-th iteration used for thinning 1
Input data file(s)
ex9.30step1.dat
Input data format FREE
SUMMARY OF DATA
Number of clusters 200
Size (s) Cluster ID with Size s
38 187
39 165 27
41 83 159
42 13 14 172 118
43 115 61 181 25
44 126 128 73 160 18 109 28 16
45 148 153 110 81 68 92 175 41 132 188 197
46 20 84 86 23 46 173 133 139 54 151 152
47 10 140 96 101 103 106 69 72 48 34 125 56 176 57 184
130 85 190 11 200
48 138 167 121 124 143 43 149 29 12 63 82 5 164
49 114 49 90 40 141 122 31 33 4 186 127 47 156 194 195
67 199 35
50 62 21 150 8 39 182 30 185 6 157 42 78 15 44 146 169
171
51 50 154 93 66 97 3 162 74 75 166 191 107 108 196 36 198
80 113
52 89 116 26 189 136 91 76 123 52 94 53 22 98
53 180 155 17 102 65 32 131 24 100
54 144 145 99 163 147 77 59 135 60 170 38 105 55 58 142
179 120
55 193 19 177 111 2 1 9 168
56 104 161 119 183 88 79 129 37 70 64
57 112 71 178 95 158 7
58 137 117
59 45 87
60 51 134
61 174 192
UNIVARIATE SAMPLE STATISTICS
UNIVARIATE HIGHER-ORDER MOMENT DESCRIPTIVE STATISTICS
Variable/ Mean/ Skewness/ Minimum/ % with Percentiles
Sample Size Variance Kurtosis Maximum Min/Max 20%/60% 40%/80% Median
Z 0.179 -0.024 -0.903 0.50% -0.213 0.021 0.197
200.000 0.187 -0.463 1.255 0.50% 0.318 0.576
Y -0.040 0.344 -3.981 0.01% -1.020 -0.373 -0.091
9994.000 1.395 0.674 5.630 0.01% 0.199 0.878
W -0.067 0.070 -2.681 0.50% -1.046 -0.386 -0.059
200.000 1.094 -0.509 2.781 0.50% 0.307 0.862
THE MODEL ESTIMATION TERMINATED NORMALLY
USE THE FBITERATIONS OPTION TO INCREASE THE NUMBER OF ITERATIONS BY A FACTOR
OF AT LEAST TWO TO CHECK CONVERGENCE AND THAT THE PSR VALUE DOES NOT INCREASE.
MODEL FIT INFORMATION
Number of Free Parameters 7
Bayesian Posterior Predictive Checking using Chi-Square
95% Confidence Interval for the Difference Between
the Observed and the Replicated Chi-Square Values
24.107 59.972
Posterior Predictive P-Value 0.000
Information Criteria
Deviance (DIC) 30354.545
Estimated Number of Parameters (pD) 169.342
MODEL RESULTS
Posterior One-Tailed 95% C.I.
Estimate S.D. P-Value Lower 2.5% Upper 2.5% Significance
Within Level
Variances
Y 1.197 0.017 0.000 1.164 1.234 *
Between Level
Y ON
W 0.308 0.024 0.000 0.264 0.358 *
Z ON
Y 0.793 0.047 0.000 0.698 0.882 *
Intercepts
Z 0.210 0.020 0.000 0.172 0.252 *
Y -0.019 0.025 0.219 -0.068 0.027
Residual Variances
Z 0.065 0.008 0.000 0.051 0.084 *
Y 0.096 0.013 0.000 0.074 0.125 *
TECHNICAL 1 OUTPUT
PARAMETER SPECIFICATION FOR WITHIN
NU
Y
________
0
LAMBDA
Y
________
Y 0
THETA
Y
________
Y 0
ALPHA
Y
________
0
BETA
Y
________
Y 0
PSI
Y
________
Y 1
PARAMETER SPECIFICATION FOR BETWEEN
NU
Z Y W
________ ________ ________
0 0 0
LAMBDA
Z Y W
________ ________ ________
Z 0 0 0
Y 0 0 0
W 0 0 0
THETA
Z Y W
________ ________ ________
Z 0
Y 0 0
W 0 0 0
ALPHA
Z Y W
________ ________ ________
2 3 0
BETA
Z Y W
________ ________ ________
Z 0 4 0
Y 0 0 5
W 0 0 0
PSI
Z Y W
________ ________ ________
Z 6
Y 0 7
W 0 0 0
STARTING VALUES FOR WITHIN
NU
Y
________
0.000
LAMBDA
Y
________
Y 1.000
THETA
Y
________
Y 0.000
ALPHA
Y
________
0.000
BETA
Y
________
Y 0.000
PSI
Y
________
Y 0.698
STARTING VALUES FOR BETWEEN
NU
Z Y W
________ ________ ________
0.000 0.000 0.000
LAMBDA
Z Y W
________ ________ ________
Z 1.000 0.000 0.000
Y 0.000 1.000 0.000
W 0.000 0.000 1.000
THETA
Z Y W
________ ________ ________
Z 0.000
Y 0.000 0.000
W 0.000 0.000 0.000
ALPHA
Z Y W
________ ________ ________
0.175 -0.040 0.000
BETA
Z Y W
________ ________ ________
Z 0.000 0.000 0.000
Y 0.000 0.000 0.000
W 0.000 0.000 0.000
PSI
Z Y W
________ ________ ________
Z 0.093
Y 0.000 0.698
W 0.000 0.000 0.548
PRIORS FOR ALL PARAMETERS PRIOR MEAN PRIOR VARIANCE PRIOR STD. DEV.
Parameter 1~IG(-1.000,0.000) infinity infinity infinity
Parameter 2~N(0.000,infinity) 0.0000 infinity infinity
Parameter 3~N(0.000,infinity) 0.0000 infinity infinity
Parameter 4~N(0.000,infinity) 0.0000 infinity infinity
Parameter 5~N(0.000,infinity) 0.0000 infinity infinity
Parameter 6~IG(-1.000,0.000) infinity infinity infinity
Parameter 7~IG(-1.000,0.000) infinity infinity infinity
TECHNICAL 8 OUTPUT
TECHNICAL 8 OUTPUT FOR BAYES ESTIMATION
CHAIN BSEED
1 0
2 285380
POTENTIAL PARAMETER WITH
ITERATION SCALE REDUCTION HIGHEST PSR
100 1.009 7
200 1.017 2
300 1.002 5
400 1.006 2
500 1.014 2
600 1.016 2
700 1.008 2
800 1.013 7
900 1.006 7
1000 1.008 7
PLOT INFORMATION
The following plots are available:
Histograms (sample values)
Scatterplots (sample values)
Between-level histograms (sample values, sample means/variances)
Between-level scatterplots (sample values, sample means/variances)
Bayesian posterior parameter distributions
Bayesian posterior parameter trace plots
Bayesian autocorrelation plots
Bayesian posterior predictive checking scatterplots
Bayesian posterior predictive checking distribution plots
SAVEDATA INFORMATION
Save file
ex9.30.dat
Order and format of variables
Z F10.3
Y F10.3
W F10.3
TIME F10.3
SUBJECT I4
Save file format
4F10.3 I4
Save file record length 10000
Save missing symbol *
Beginning Time: 22:30:12
Ending Time: 22:30:15
Elapsed Time: 00:00:03
MUTHEN & MUTHEN
3463 Stoner Ave.
Los Angeles, CA 90066
Tel: (310) 391-9971
Fax: (310) 391-8971
Web: www.StatModel.com
Support: Support@StatModel.com
Copyright (c) 1998-2022 Muthen & Muthen
Back to examples