Mplus VERSION 8.8
MUTHEN & MUTHEN
04/19/2022 10:27 PM
INPUT INSTRUCTIONS
TITLE: this is an example of a two-level
regression analysis for a continuous
dependent variable
montecarlo:
names are y x w xm;
nobservations = 1000;
ncsizes = 3;
csizes = 40 (5) 50 (10) 20 (15);
seed = 58459;
nreps = 1;
within = x;
between = w xm;
save = ex9.2a.dat;
ANALYSIS: TYPE = TWOLEVEL RANDOM;
model population:
%within%
[x@0]; x@1;
s | y on x;
y*1;
%between%
[w@0]; w*1;
[xm@0]; xm*.5;
w with xm*.5;
y on w*1 xm*1;
s on w*.5 xm*.3;
[y*2 s*1];
y*.5; s*.3;
y with s*.2;
model:
%within%
s | y on x;
y*1;
%between%
y on w*1 xm*1;
s on w*.5 xm*.3;
[y*2 s*1];
y*.5; s*.3;
y with s*.2;
output:
tech9;
INPUT READING TERMINATED NORMALLY
this is an example of a two-level
regression analysis for a continuous
dependent variable
SUMMARY OF ANALYSIS
Number of groups 1
Number of observations 1000
Number of replications
Requested 1
Completed 1
Value of seed 58459
Number of dependent variables 1
Number of independent variables 3
Number of continuous latent variables 1
Observed dependent variables
Continuous
Y
Observed independent variables
X W XM
Continuous latent variables
S
Variables with special functions
Within variables
X
Between variables
W XM
Estimator MLR
Information matrix OBSERVED
Maximum number of iterations 100
Convergence criterion 0.100D-05
Maximum number of EM iterations 500
Convergence criteria for the EM algorithm
Loglikelihood change 0.100D-02
Relative loglikelihood change 0.100D-05
Derivative 0.100D-03
Minimum variance 0.100D-03
Maximum number of steepest descent iterations 20
Maximum number of iterations for H1 2000
Convergence criterion for H1 0.100D-03
Optimization algorithm EMA
SUMMARY OF DATA FOR THE FIRST REPLICATION
Cluster information
Size (s) Number of clusters of Size s
5 40
10 50
15 20
Average cluster size 9.091
Estimated Intraclass Correlations for the Y Variables
Intraclass Intraclass
Variable Correlation Variable Correlation
Y 0.574
SAMPLE STATISTICS FOR THE FIRST REPLICATION
NOTE: The sample statistics for within and between refer to the
maximum-likelihood estimated within and between covariance
matrices, respectively.
ESTIMATED SAMPLE STATISTICS FOR WITHIN
Means
Y X W XM
________ ________ ________ ________
0.000 0.027 0.000 0.000
Covariances
Y X W XM
________ ________ ________ ________
Y 2.282
X 0.643 1.042
W 0.000 0.000 0.000
XM 0.000 0.000 0.000 0.000
Correlations
Y X W XM
________ ________ ________ ________
Y 1.000
X 0.417 1.000
W 0.000 0.000 0.000
XM 0.000 0.000 0.000 0.000
ESTIMATED SAMPLE STATISTICS FOR BETWEEN
Means
Y X W XM
________ ________ ________ ________
1.475 0.000 -0.328 -0.277
Covariances
Y X W XM
________ ________ ________ ________
Y 3.072
X 0.000 0.000
W 1.366 0.000 0.885
XM 0.989 0.000 0.443 0.458
Correlations
Y X W XM
________ ________ ________ ________
Y 1.000
X 0.000 0.000
W 0.828 0.000 1.000
XM 0.834 0.000 0.696 1.000
MODEL FIT INFORMATION
Number of Free Parameters 10
Loglikelihood
H0 Value
Mean -1584.044
Std Dev 0.000
Number of successful computations 1
Proportions Percentiles
Expected Observed Expected Observed
0.990 0.000 -1584.044 -1584.044
0.980 0.000 -1584.044 -1584.044
0.950 0.000 -1584.044 -1584.044
0.900 0.000 -1584.044 -1584.044
0.800 0.000 -1584.044 -1584.044
0.700 0.000 -1584.044 -1584.044
0.500 0.000 -1584.044 -1584.044
0.300 0.000 -1584.044 -1584.044
0.200 0.000 -1584.044 -1584.044
0.100 0.000 -1584.044 -1584.044
0.050 0.000 -1584.044 -1584.044
0.020 0.000 -1584.044 -1584.044
0.010 0.000 -1584.044 -1584.044
Information Criteria
Akaike (AIC)
Mean 3188.088
Std Dev 0.000
Number of successful computations 1
Proportions Percentiles
Expected Observed Expected Observed
0.990 0.000 3188.088 3188.088
0.980 0.000 3188.088 3188.088
0.950 0.000 3188.088 3188.088
0.900 0.000 3188.088 3188.088
0.800 0.000 3188.088 3188.088
0.700 0.000 3188.088 3188.088
0.500 0.000 3188.088 3188.088
0.300 0.000 3188.088 3188.088
0.200 0.000 3188.088 3188.088
0.100 0.000 3188.088 3188.088
0.050 0.000 3188.088 3188.088
0.020 0.000 3188.088 3188.088
0.010 0.000 3188.088 3188.088
Bayesian (BIC)
Mean 3237.165
Std Dev 0.000
Number of successful computations 1
Proportions Percentiles
Expected Observed Expected Observed
0.990 0.000 3237.165 3237.165
0.980 0.000 3237.165 3237.165
0.950 0.000 3237.165 3237.165
0.900 0.000 3237.165 3237.165
0.800 0.000 3237.165 3237.165
0.700 0.000 3237.165 3237.165
0.500 0.000 3237.165 3237.165
0.300 0.000 3237.165 3237.165
0.200 0.000 3237.165 3237.165
0.100 0.000 3237.165 3237.165
0.050 0.000 3237.165 3237.165
0.020 0.000 3237.165 3237.165
0.010 0.000 3237.165 3237.165
Sample-Size Adjusted BIC (n* = (n + 2) / 24)
Mean 3205.405
Std Dev 0.000
Number of successful computations 1
Proportions Percentiles
Expected Observed Expected Observed
0.990 0.000 3205.405 3205.405
0.980 0.000 3205.405 3205.405
0.950 0.000 3205.405 3205.405
0.900 0.000 3205.405 3205.405
0.800 0.000 3205.405 3205.405
0.700 0.000 3205.405 3205.405
0.500 0.000 3205.405 3205.405
0.300 0.000 3205.405 3205.405
0.200 0.000 3205.405 3205.405
0.100 0.000 3205.405 3205.405
0.050 0.000 3205.405 3205.405
0.020 0.000 3205.405 3205.405
0.010 0.000 3205.405 3205.405
MODEL RESULTS
ESTIMATES S. E. M. S. E. 95% % Sig
Population Average Std. Dev. Average Cover Coeff
Within Level
Residual Variances
Y 1.000 1.0315 0.0000 0.0466 0.0010 1.000 1.000
Between Level
S ON
W 0.500 0.3956 0.0000 0.0974 0.0109 1.000 1.000
XM 0.300 0.5424 0.0000 0.1356 0.0588 1.000 1.000
Y ON
W 1.000 0.8633 0.0000 0.1171 0.0187 1.000 1.000
XM 1.000 1.3298 0.0000 0.1624 0.1088 0.000 1.000
Y WITH
S 0.200 0.2970 0.0000 0.0659 0.0094 1.000 1.000
Intercepts
Y 2.000 2.0848 0.0000 0.0869 0.0072 1.000 1.000
S 1.000 1.0394 0.0000 0.0752 0.0016 1.000 1.000
Residual Variances
Y 0.500 0.5890 0.0000 0.0985 0.0079 1.000 1.000
S 0.300 0.3341 0.0000 0.0563 0.0012 1.000 1.000
QUALITY OF NUMERICAL RESULTS
Average Condition Number for the Information Matrix 0.172E-01
(ratio of smallest to largest eigenvalue)
TECHNICAL 1 OUTPUT
PARAMETER SPECIFICATION FOR WITHIN
NU
Y X
________ ________
0 0
LAMBDA
Y X
________ ________
Y 0 0
X 0 0
THETA
Y X
________ ________
Y 0
X 0 0
ALPHA
Y X
________ ________
0 0
BETA
Y X
________ ________
Y 0 0
X 0 0
PSI
Y X
________ ________
Y 1
X 0 0
PARAMETER SPECIFICATION FOR BETWEEN
NU
Y W XM
________ ________ ________
0 0 0
LAMBDA
S Y W XM
________ ________ ________ ________
Y 0 0 0 0
W 0 0 0 0
XM 0 0 0 0
THETA
Y W XM
________ ________ ________
Y 0
W 0 0
XM 0 0 0
ALPHA
S Y W XM
________ ________ ________ ________
2 3 0 0
BETA
S Y W XM
________ ________ ________ ________
S 0 0 4 5
Y 0 0 6 7
W 0 0 0 0
XM 0 0 0 0
PSI
S Y W XM
________ ________ ________ ________
S 8
Y 9 10
W 0 0 0
XM 0 0 0 0
STARTING VALUES FOR WITHIN
NU
Y X
________ ________
0.000 0.000
LAMBDA
Y X
________ ________
Y 1.000 0.000
X 0.000 1.000
THETA
Y X
________ ________
Y 0.000
X 0.000 0.000
ALPHA
Y X
________ ________
0.000 0.000
BETA
Y X
________ ________
Y 0.000 0.000
X 0.000 0.000
PSI
Y X
________ ________
Y 1.000
X 0.000 0.500
STARTING VALUES FOR BETWEEN
NU
Y W XM
________ ________ ________
0.000 0.000 0.000
LAMBDA
S Y W XM
________ ________ ________ ________
Y 0.000 1.000 0.000 0.000
W 0.000 0.000 1.000 0.000
XM 0.000 0.000 0.000 1.000
THETA
Y W XM
________ ________ ________
Y 0.000
W 0.000 0.000
XM 0.000 0.000 0.000
ALPHA
S Y W XM
________ ________ ________ ________
1.000 2.000 0.000 0.000
BETA
S Y W XM
________ ________ ________ ________
S 0.000 0.000 0.500 0.300
Y 0.000 0.000 1.000 1.000
W 0.000 0.000 0.000 0.000
XM 0.000 0.000 0.000 0.000
PSI
S Y W XM
________ ________ ________ ________
S 0.300
Y 0.200 0.500
W 0.000 0.000 0.500
XM 0.000 0.000 0.000 0.500
POPULATION VALUES FOR WITHIN
NU
Y X
________ ________
0.000 0.000
LAMBDA
Y X
________ ________
Y 1.000 0.000
X 0.000 1.000
THETA
Y X
________ ________
Y 0.000
X 0.000 0.000
ALPHA
Y X
________ ________
0.000 0.000
BETA
Y X
________ ________
Y 0.000 0.000
X 0.000 0.000
PSI
Y X
________ ________
Y 1.000
X 0.000 1.000
POPULATION VALUES FOR BETWEEN
NU
Y W XM
________ ________ ________
0.000 0.000 0.000
LAMBDA
S Y W XM
________ ________ ________ ________
Y 0.000 1.000 0.000 0.000
W 0.000 0.000 1.000 0.000
XM 0.000 0.000 0.000 1.000
THETA
Y W XM
________ ________ ________
Y 0.000
W 0.000 0.000
XM 0.000 0.000 0.000
ALPHA
S Y W XM
________ ________ ________ ________
1.000 2.000 0.000 0.000
BETA
S Y W XM
________ ________ ________ ________
S 0.000 0.000 0.500 0.300
Y 0.000 0.000 1.000 1.000
W 0.000 0.000 0.000 0.000
XM 0.000 0.000 0.000 0.000
PSI
S Y W XM
________ ________ ________ ________
S 0.300
Y 0.200 0.500
W 0.000 0.000 1.000
XM 0.000 0.000 0.500 0.500
TECHNICAL 9 OUTPUT
Error messages for each replication (if any)
SAVEDATA INFORMATION
Order of variables
Y
X
W
XM
CLUSTER
Save file
ex9.2a.dat
Save file format Free
Save file record length 10000
Beginning Time: 22:27:58
Ending Time: 22:27:58
Elapsed Time: 00:00:00
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