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;
nobservations = 1000;
ncsizes = 3;
csizes = 40 (5) 50 (10) 20 (15);
seed = 58459;
nreps = 1;
! within = x;
between = w;
save = ex9.2c.dat;
ANALYSIS: TYPE = TWOLEVEL RANDOM;
model population:
%within%
x@1;
s | y on x;
y*1;
%between%
[w@0]; w*1;
[x@0]; x*.5;
w with x*.5;
y on w*1 x*1;
s on w*.5 x*.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 x*1;
s on w*.5 x*.3;
[y*2 s*1];
y*.5; s*.3;
y with s*.2;
output:
tech9;
*** WARNING in MODEL command
In the MODEL command, the predictor variable on the WITHIN level refers to the whole observed
variable. To use the latent within-level part, use ESTIMATOR=BAYES in the ANALYSIS command.
This applies to the following statement(s):
S | Y ON X
*** WARNING in MODEL POPULATION command
In the MODEL POPULATION command, the predictor variable on the WITHIN level refers to the whole observed
variable. To use the latent within-level part, use ESTIMATOR=BAYES in the ANALYSIS command.
This applies to the following statement(s):
S | Y ON X
2 WARNING(S) FOUND IN THE INPUT INSTRUCTIONS
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 2
Number of continuous latent variables 1
Observed dependent variables
Continuous
Y
Observed independent variables
X W
Continuous latent variables
S
Variables with special functions
Between variables
W
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.626
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
________ ________ ________
0.000 0.000 0.000
Covariances
Y X W
________ ________ ________
Y 2.641
X 0.960 1.041
W 0.000 0.000 0.000
Correlations
Y X W
________ ________ ________
Y 1.000
X 0.579 1.000
W 0.000 0.000 0.000
ESTIMATED SAMPLE STATISTICS FOR BETWEEN
Means
Y X W
________ ________ ________
2.090 -0.079 -0.106
Covariances
Y X W
________ ________ ________
Y 4.424
X 1.023 0.364
W 1.470 0.298 0.808
Correlations
Y X W
________ ________ ________
Y 1.000
X 0.806 1.000
W 0.778 0.550 1.000
MODEL FIT INFORMATION
Number of Free Parameters 10
Loglikelihood
H0 Value
Mean -3088.493
Std Dev 0.000
Number of successful computations 1
Proportions Percentiles
Expected Observed Expected Observed
0.990 0.000 -3088.493 -3088.493
0.980 0.000 -3088.493 -3088.493
0.950 0.000 -3088.493 -3088.493
0.900 0.000 -3088.493 -3088.493
0.800 0.000 -3088.493 -3088.493
0.700 0.000 -3088.493 -3088.493
0.500 0.000 -3088.493 -3088.493
0.300 0.000 -3088.493 -3088.493
0.200 0.000 -3088.493 -3088.493
0.100 0.000 -3088.493 -3088.493
0.050 0.000 -3088.493 -3088.493
0.020 0.000 -3088.493 -3088.493
0.010 0.000 -3088.493 -3088.493
Information Criteria
Akaike (AIC)
Mean 6196.986
Std Dev 0.000
Number of successful computations 1
Proportions Percentiles
Expected Observed Expected Observed
0.990 0.000 6196.986 6196.986
0.980 0.000 6196.986 6196.986
0.950 0.000 6196.986 6196.986
0.900 0.000 6196.986 6196.986
0.800 0.000 6196.986 6196.986
0.700 0.000 6196.986 6196.986
0.500 0.000 6196.986 6196.986
0.300 0.000 6196.986 6196.986
0.200 0.000 6196.986 6196.986
0.100 0.000 6196.986 6196.986
0.050 0.000 6196.986 6196.986
0.020 0.000 6196.986 6196.986
0.010 0.000 6196.986 6196.986
Bayesian (BIC)
Mean 6246.063
Std Dev 0.000
Number of successful computations 1
Proportions Percentiles
Expected Observed Expected Observed
0.990 0.000 6246.063 6246.063
0.980 0.000 6246.063 6246.063
0.950 0.000 6246.063 6246.063
0.900 0.000 6246.063 6246.063
0.800 0.000 6246.063 6246.063
0.700 0.000 6246.063 6246.063
0.500 0.000 6246.063 6246.063
0.300 0.000 6246.063 6246.063
0.200 0.000 6246.063 6246.063
0.100 0.000 6246.063 6246.063
0.050 0.000 6246.063 6246.063
0.020 0.000 6246.063 6246.063
0.010 0.000 6246.063 6246.063
Sample-Size Adjusted BIC (n* = (n + 2) / 24)
Mean 6214.303
Std Dev 0.000
Number of successful computations 1
Proportions Percentiles
Expected Observed Expected Observed
0.990 0.000 6214.303 6214.303
0.980 0.000 6214.303 6214.303
0.950 0.000 6214.303 6214.303
0.900 0.000 6214.303 6214.303
0.800 0.000 6214.303 6214.303
0.700 0.000 6214.303 6214.303
0.500 0.000 6214.303 6214.303
0.300 0.000 6214.303 6214.303
0.200 0.000 6214.303 6214.303
0.100 0.000 6214.303 6214.303
0.050 0.000 6214.303 6214.303
0.020 0.000 6214.303 6214.303
0.010 0.000 6214.303 6214.303
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.0260 0.0000 0.0521 0.0007 1.000 1.000
Between Level
S ON
W 0.500 0.5693 0.0000 0.0935 0.0048 1.000 1.000
X 0.300 0.3151 0.0000 0.1798 0.0002 1.000 0.000
Y ON
W 1.000 1.1858 0.0000 0.1134 0.0345 1.000 1.000
X 1.000 1.0238 0.0000 0.2170 0.0006 1.000 1.000
Y WITH
S 0.200 0.2682 0.0000 0.0611 0.0047 1.000 1.000
Intercepts
Y 2.000 2.0873 0.0000 0.0829 0.0076 1.000 1.000
S 1.000 1.0170 0.0000 0.0705 0.0003 1.000 1.000
Residual Variances
Y 0.500 0.4833 0.0000 0.0976 0.0003 1.000 1.000
S 0.300 0.3684 0.0000 0.0563 0.0047 1.000 1.000
QUALITY OF NUMERICAL RESULTS
Average Condition Number for the Information Matrix 0.112E-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 X W
________ ________ ________
0 0 0
LAMBDA
S Y X W
________ ________ ________ ________
Y 0 0 0 0
X 0 0 0 0
W 0 0 0 0
THETA
Y X W
________ ________ ________
Y 0
X 0 0
W 0 0 0
ALPHA
S Y X W
________ ________ ________ ________
2 3 0 0
BETA
S Y X W
________ ________ ________ ________
S 0 0 4 5
Y 0 0 6 7
X 0 0 0 0
W 0 0 0 0
PSI
S Y X W
________ ________ ________ ________
S 8
Y 9 10
X 0 0 0
W 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 X W
________ ________ ________
0.000 0.000 0.000
LAMBDA
S Y X W
________ ________ ________ ________
Y 0.000 1.000 0.000 0.000
X 0.000 0.000 1.000 0.000
W 0.000 0.000 0.000 1.000
THETA
Y X W
________ ________ ________
Y 0.000
X 0.000 0.000
W 0.000 0.000 0.000
ALPHA
S Y X W
________ ________ ________ ________
1.000 2.000 0.000 0.000
BETA
S Y X W
________ ________ ________ ________
S 0.000 0.000 0.300 0.500
Y 0.000 0.000 1.000 1.000
X 0.000 0.000 0.000 0.000
W 0.000 0.000 0.000 0.000
PSI
S Y X W
________ ________ ________ ________
S 0.300
Y 0.200 0.500
X 0.000 0.000 0.500
W 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 X W
________ ________ ________
0.000 0.000 0.000
LAMBDA
S Y X W
________ ________ ________ ________
Y 0.000 1.000 0.000 0.000
X 0.000 0.000 1.000 0.000
W 0.000 0.000 0.000 1.000
THETA
Y X W
________ ________ ________
Y 0.000
X 0.000 0.000
W 0.000 0.000 0.000
ALPHA
S Y X W
________ ________ ________ ________
1.000 2.000 0.000 0.000
BETA
S Y X W
________ ________ ________ ________
S 0.000 0.000 0.300 0.500
Y 0.000 0.000 1.000 1.000
X 0.000 0.000 0.000 0.000
W 0.000 0.000 0.000 0.000
PSI
S Y X W
________ ________ ________ ________
S 0.300
Y 0.200 0.500
X 0.000 0.000 0.500
W 0.000 0.000 0.500 1.000
TECHNICAL 9 OUTPUT
Error messages for each replication (if any)
SAVEDATA INFORMATION
Order of variables
Y
X
W
CLUSTER
Save file
ex9.2c.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