```Mplus VERSION 8
MUTHEN & MUTHEN
04/10/2017   3:32 AM

INPUT INSTRUCTIONS

TITLE:  this is an example of regression with cross-
classified data
montecarlo:
names = y x1 x2 w z;
within = x1 x2;
between = (level2a) w (level2b) z;
nobs = 3000;
nreps =1;
csizes = 50[30(2)];
ncsizes = 1[1];
save = ex9.24.dat;
analysis:
type = crossclassified random;
estimator = bayes;
processors = 2;
biter = (2000);
model population:
%within%
x1-x2@1;
y on x1*1;
s | y on x2;
y*2;
%between level2a%
w@1;
y on w*.6;
y*1;
s on w*.3;
s*.4;
y with s*0;
%between level2b%
z@1;
y on z*.4;
y*.5;
[y*2];
s on z*.3;
s*.2;
[s*1];
y with s*0;
model:
%within%
! x1-x2@1;
y on x1*1;
s | y on x2;
y*2;
%between level2a%
! w@1;
y on w*.6;
y*1;
s on w*.3;
s*.4;
y with s*0;
%between level2b%
! z@1;
y on z*.4;
y*.5;
[y*2];
s on z*.3;
s*.2;
[s*1];
y with s*0;

output: tech8;

this is an example of regression with cross-
classified data

SUMMARY OF ANALYSIS

Number of groups                                                 1
Number of observations                                        3000

Number of replications
Requested                                                    1
Completed                                                    1
Value of seed                                                    0

Number of dependent variables                                    1
Number of independent variables                                  4
Number of continuous latent variables                            1

Observed dependent variables

Continuous
Y

Observed independent variables
X1          X2          W           Z

Continuous latent variables
S

Variables with special functions

Within variables
X1          X2

Level 2a between variables
W

Level 2b between variables
Z

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
Treatment of categorical mediator                         LATENT
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

SUMMARY OF DATA FOR THE FIRST REPLICATION

Cluster information

Number of level 2a clusters           30
Number of level 2b clusters           50

MODEL FIT INFORMATION

Number of Free Parameters                       14

Information Criteria

Deviance (DIC)

Mean                             10690.173
Std Dev                              0.000
Number of successful computations        1

Proportions                   Percentiles
Expected    Observed         Expected       Observed
0.990       0.000        10690.173      10690.173
0.980       0.000        10690.173      10690.173
0.950       0.000        10690.173      10690.173
0.900       0.000        10690.173      10690.173
0.800       0.000        10690.173      10690.173
0.700       0.000        10690.173      10690.173
0.500       0.000        10690.173      10690.173
0.300       0.000        10690.173      10690.173
0.200       0.000        10690.173      10690.173
0.100       0.000        10690.173      10690.173
0.050       0.000        10690.173      10690.173
0.020       0.000        10690.173      10690.173
0.010       0.000        10690.173      10690.173

Estimated Number of Parameters (pD)

Mean                               148.893
Std Dev                              0.000
Number of successful computations        1

Proportions                   Percentiles
Expected    Observed         Expected       Observed
0.990       0.000          148.893        148.893
0.980       0.000          148.893        148.893
0.950       0.000          148.893        148.893
0.900       0.000          148.893        148.893
0.800       0.000          148.893        148.893
0.700       0.000          148.893        148.893
0.500       0.000          148.893        148.893
0.300       0.000          148.893        148.893
0.200       0.000          148.893        148.893
0.100       0.000          148.893        148.893
0.050       0.000          148.893        148.893
0.020       0.000          148.893        148.893
0.010       0.000          148.893        148.893

MODEL RESULTS

ESTIMATES              S. E.     M. S. E.  95%  % Sig
Population   Average   Std. Dev.   Average             Cover Coeff
Within Level

Y          ON
X1                  1.000     0.9984     0.0000     0.0258     0.0000 1.000 1.000

Residual Variances
Y                   2.000     1.9684     0.0000     0.0533     0.0010 1.000 1.000

Between LEVEL2A Level

S          ON
W                   0.300     0.5122     0.0000     0.1386     0.0450 1.000 1.000

Y          ON
W                   0.600     0.6296     0.0000     0.2138     0.0009 1.000 1.000

Y        WITH
S                   0.000     0.0143     0.0000     0.2251     0.0002 1.000 0.000

Residual Variances
Y                   1.000     1.5108     0.0000     0.5241     0.2609 1.000 1.000
S                   0.400     0.5994     0.0000     0.2153     0.0398 1.000 1.000

Between LEVEL2B Level

S          ON
Z                   0.300     0.3352     0.0000     0.0636     0.0012 1.000 1.000

Y          ON
Z                   0.400     0.6743     0.0000     0.1213     0.0753 0.000 1.000

Y        WITH
S                   0.000     0.0081     0.0000     0.0608     0.0001 1.000 0.000

Intercepts
Y                   2.000     1.5688     0.0000     0.2917     0.1859 1.000 1.000
S                   1.000     0.9085     0.0000     0.1611     0.0084 1.000 1.000

Residual Variances
Y                   0.500     0.6858     0.0000     0.1628     0.0345 1.000 1.000
S                   0.200     0.1622     0.0000     0.0462     0.0014 1.000 1.000

CORRELATIONS AND MEAN SQUARE ERROR OF THE TRUE FACTOR VALUES AND THE FACTOR SCORES

CORRELATIONS                MEAN SQUARE ERROR
Average    Std. Dev.           Average    Std. Dev.
S%2a                0.991       0.000              0.167       0.000
S%2b                0.942       0.000              0.209       0.000
B2a_Y               0.994       0.000              0.314       0.000
B2b_Y               0.980       0.000              0.288       0.000

TECHNICAL 1 OUTPUT

PARAMETER SPECIFICATION FOR WITHIN

NU
Y             X1            X2
________      ________      ________
0             0             0

LAMBDA
Y             X1            X2
________      ________      ________
Y                  0             0             0
X1                 0             0             0
X2                 0             0             0

THETA
Y             X1            X2
________      ________      ________
Y                  0
X1                 0             0
X2                 0             0             0

ALPHA
Y             X1            X2
________      ________      ________
0             0             0

BETA
Y             X1            X2
________      ________      ________
Y                  0             1             0
X1                 0             0             0
X2                 0             0             0

PSI
Y             X1            X2
________      ________      ________
Y                  2
X1                 0             0
X2                 0             0             0

PARAMETER SPECIFICATION FOR BETWEEN LEVEL2A

NU
Y             W
________      ________
0             0

LAMBDA
S%2a          Y             W
________      ________      ________
Y                  0             0             0
W                  0             0             0

THETA
Y             W
________      ________
Y                  0
W                  0             0

ALPHA
S%2a          Y             W
________      ________      ________
0             0             0

BETA
S%2a          Y             W
________      ________      ________
S%2a               0             0             3
Y                  0             0             4
W                  0             0             0

PSI
S%2a          Y             W
________      ________      ________
S%2a               5
Y                  6             7
W                  0             0             0

PARAMETER SPECIFICATION FOR BETWEEN LEVEL2B

NU
Y             Z
________      ________
0             0

LAMBDA
S%2b          Y             Z
________      ________      ________
Y                  0             0             0
Z                  0             0             0

THETA
Y             Z
________      ________
Y                  0
Z                  0             0

ALPHA
S%2b          Y             Z
________      ________      ________
8             9             0

BETA
S%2b          Y             Z
________      ________      ________
S%2b               0             0            10
Y                  0             0            11
Z                  0             0             0

PSI
S%2b          Y             Z
________      ________      ________
S%2b              12
Y                 13            14
Z                  0             0             0

STARTING VALUES FOR WITHIN

NU
Y             X1            X2
________      ________      ________
0.000         0.000         0.000

LAMBDA
Y             X1            X2
________      ________      ________
Y              1.000         0.000         0.000
X1             0.000         1.000         0.000
X2             0.000         0.000         1.000

THETA
Y             X1            X2
________      ________      ________
Y              0.000
X1             0.000         0.000
X2             0.000         0.000         0.000

ALPHA
Y             X1            X2
________      ________      ________
0.000         0.000         0.000

BETA
Y             X1            X2
________      ________      ________
Y              0.000         1.000         0.000
X1             0.000         0.000         0.000
X2             0.000         0.000         0.000

PSI
Y             X1            X2
________      ________      ________
Y              2.000
X1             0.000         0.500
X2             0.000         0.000         0.500

STARTING VALUES FOR BETWEEN LEVEL2A

NU
Y             W
________      ________
0.000         0.000

LAMBDA
S%2a          Y             W
________      ________      ________
Y              0.000         1.000         0.000
W              0.000         0.000         1.000

THETA
Y             W
________      ________
Y              0.000
W              0.000         0.000

ALPHA
S%2a          Y             W
________      ________      ________
0.000         0.000         0.000

BETA
S%2a          Y             W
________      ________      ________
S%2a           0.000         0.000         0.300
Y              0.000         0.000         0.600
W              0.000         0.000         0.000

PSI
S%2a          Y             W
________      ________      ________
S%2a           0.400
Y              0.000         1.000
W              0.000         0.000         0.500

STARTING VALUES FOR BETWEEN LEVEL2B

NU
Y             Z
________      ________
0.000         0.000

LAMBDA
S%2b          Y             Z
________      ________      ________
Y              0.000         1.000         0.000
Z              0.000         0.000         1.000

THETA
Y             Z
________      ________
Y              0.000
Z              0.000         0.000

ALPHA
S%2b          Y             Z
________      ________      ________
1.000         2.000         0.000

BETA
S%2b          Y             Z
________      ________      ________
S%2b           0.000         0.000         0.300
Y              0.000         0.000         0.400
Z              0.000         0.000         0.000

PSI
S%2b          Y             Z
________      ________      ________
S%2b           0.200
Y              0.000         0.500
Z              0.000         0.000         0.500

POPULATION VALUES FOR WITHIN

NU
Y             X1            X2
________      ________      ________
0.000         0.000         0.000

LAMBDA
Y             X1            X2
________      ________      ________
Y              1.000         0.000         0.000
X1             0.000         1.000         0.000
X2             0.000         0.000         1.000

THETA
Y             X1            X2
________      ________      ________
Y              0.000
X1             0.000         0.000
X2             0.000         0.000         0.000

ALPHA
Y             X1            X2
________      ________      ________
0.000         0.000         0.000

BETA
Y             X1            X2
________      ________      ________
Y              0.000         1.000         0.000
X1             0.000         0.000         0.000
X2             0.000         0.000         0.000

PSI
Y             X1            X2
________      ________      ________
Y              2.000
X1             0.000         1.000
X2             0.000         0.000         1.000

POPULATION VALUES FOR BETWEEN LEVEL2A

NU
Y             W
________      ________
0.000         0.000

LAMBDA
S%2a          Y             W
________      ________      ________
Y              0.000         1.000         0.000
W              0.000         0.000         1.000

THETA
Y             W
________      ________
Y              0.000
W              0.000         0.000

ALPHA
S%2a          Y             W
________      ________      ________
0.000         0.000         0.000

BETA
S%2a          Y             W
________      ________      ________
S%2a           0.000         0.000         0.300
Y              0.000         0.000         0.600
W              0.000         0.000         0.000

PSI
S%2a          Y             W
________      ________      ________
S%2a           0.400
Y              0.000         1.000
W              0.000         0.000         1.000

POPULATION VALUES FOR BETWEEN LEVEL2B

NU
Y             Z
________      ________
0.000         0.000

LAMBDA
S%2b          Y             Z
________      ________      ________
Y              0.000         1.000         0.000
Z              0.000         0.000         1.000

THETA
Y             Z
________      ________
Y              0.000
Z              0.000         0.000

ALPHA
S%2b          Y             Z
________      ________      ________
1.000         2.000         0.000

BETA
S%2b          Y             Z
________      ________      ________
S%2b           0.000         0.000         0.300
Y              0.000         0.000         0.400
Z              0.000         0.000         0.000

PSI
S%2b          Y             Z
________      ________      ________
S%2b           0.200
Y              0.000         0.500
Z              0.000         0.000         1.000

PRIORS FOR ALL PARAMETERS            PRIOR MEAN      PRIOR VARIANCE     PRIOR STD. DEV.

Parameter 1~N(0.000,infinity)           0.0000            infinity            infinity
Parameter 2~IG(-1.000,0.000)          infinity            infinity            infinity
Parameter 3~N(0.000,infinity)           0.0000            infinity            infinity
Parameter 4~N(0.000,infinity)           0.0000            infinity            infinity
Parameter 5~IW(0.000,-3)              infinity            infinity            infinity
Parameter 6~IW(0.000,-3)              infinity            infinity            infinity
Parameter 7~IW(0.000,-3)              infinity            infinity            infinity
Parameter 8~N(0.000,infinity)           0.0000            infinity            infinity
Parameter 9~N(0.000,infinity)           0.0000            infinity            infinity
Parameter 10~N(0.000,infinity)          0.0000            infinity            infinity
Parameter 11~N(0.000,infinity)          0.0000            infinity            infinity
Parameter 12~IW(0.000,-3)             infinity            infinity            infinity
Parameter 13~IW(0.000,-3)             infinity            infinity            infinity
Parameter 14~IW(0.000,-3)             infinity            infinity            infinity

TECHNICAL 8 OUTPUT

REPLICATION 1:

Kolmogorov-Smirnov comparing posterior distributions across chains 1 and 2 using 100 draws.

Parameter   KS Statistic P-value
Parameter 9    0.2700    0.0010
Parameter 3    0.2000    0.0314
Parameter 6    0.1800    0.0691
Parameter 10    0.1500    0.1930
Parameter 11    0.1500    0.1930
Parameter 1    0.1200    0.4431
Parameter 14    0.1200    0.4431
Parameter 7    0.1100    0.5560
Parameter 4    0.1000    0.6766
Parameter 2    0.0800    0.8938
Parameter 5    0.0800    0.8938
Parameter 8    0.0600    0.9921
Parameter 12    0.0400    1.0000
Parameter 13    0.0300    1.0000

Simulated prior distributions

Parameter       Prior Mean  Prior Variance  Prior Std. Dev.

Parameter 1 Improper Prior
Parameter 2 Improper Prior
Parameter 3 Improper Prior
Parameter 4 Improper Prior
Parameter 5 Improper Prior
Parameter 6 Improper Prior
Parameter 7 Improper Prior
Parameter 8 Improper Prior
Parameter 9 Improper Prior
Parameter 10 Improper Prior
Parameter 11 Improper Prior
Parameter 12 Improper Prior
Parameter 13 Improper Prior
Parameter 14 Improper Prior

TECHNICAL 8 OUTPUT FOR BAYES ESTIMATION

CHAIN    BSEED
1        0
2        285380

REPLICATION 1:

POTENTIAL       PARAMETER WITH
ITERATION    SCALE REDUCTION      HIGHEST PSR
100              1.119               8
200              1.256               9
300              2.018               9
400              2.132               9
500              1.433               8
600              1.372               8
700              1.276               9
800              1.367               9
900              1.549               9
1000             1.384               9
1100             1.282               9
1200             1.076               9
1300             1.018               9
1400             1.053               9
1500             1.090               9
1600             1.064               9
1700             1.016               9
1800             1.007               7
1900             1.008               7
2000             1.007               7

SAVEDATA INFORMATION

Order of variables

Y
X1
X2
W
Z
LEVEL2A
LEVEL2B

Save file
ex9.24.dat

Save file format           Free
Save file record length    10000

Beginning Time:  03:32:07
Ending Time:  03:32:10
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-2017 Muthen & Muthen
```