Mplus VERSION 8.8
MUTHEN & MUTHEN
04/19/2022  10:24 PM

INPUT INSTRUCTIONS

  title:
  	this is an example of a loglinear model
  	for a three-way table with conditional
  	independence between the first two variables

  montecarlo:
  	names are u1-u3;
  	genclasses = c1(2) c2(2) c3(2);
  	classes = c1(2) c2(2) c3(2);
  	generate = u1-u3(1);
  	categorical = u1-u3;
  	nobs = 500;
  	seed = 3454367;
  	nrep = 1;
  	save = ex7.15.dat;

  analysis:
  	type = mixture;
  	parameterization = loglinear;

  model population:

  	%overall%

  	c1#1 with c3#1*.5;
  	c2#1 with c3#1*.75;

  model population-c1:

  	%c1#1%
  	[u1$1@15];
  	%c1#2%
  	[u1$1@-15];

  model population-c2:

  	%c2#1%
  	[u2$1@15];
  	%c2#2%
  	[u2$1@-15];

  model population-c3:

  	%c3#1%
  	[u3$1@15];
  	%c3#2%
  	[u3$1@-15];

  model:

  	%overall%

  	c1#1 with c3#1*.5;
  	c2#1 with c3#1*.75;

  model c1:

  	%c1#1%
  	[u1$1@15];
  	%c1#2%
  	[u1$1@-15];

  model c2:

  	%c2#1%
  	[u2$1@15];
  	%c2#2%
  	[u2$1@-15];

  model c3:

  	%c3#1%
  	[u3$1@15];
  	%c3#2%
  	[u3$1@-15];


  output:
  	tech8 tech9;
  	
  	
  	

  	
  	



INPUT READING TERMINATED NORMALLY




this is an example of a loglinear model
for a three-way table with conditional
independence between the first two variables

SUMMARY OF ANALYSIS

Number of groups                                                 1
Number of observations                                         500

Number of replications
    Requested                                                    1
    Completed                                                    1
Value of seed                                              3454367

Number of dependent variables                                    3
Number of independent variables                                  0
Number of continuous latent variables                            0
Number of categorical latent variables                           3

Observed dependent variables

  Binary and ordered categorical (ordinal)
   U1          U2          U3

Categorical latent variables
   C1          C2          C3


Estimator                                                      MLR
Information matrix                                        OBSERVED
Optimization Specifications for the Quasi-Newton Algorithm for
Continuous Outcomes
  Maximum number of iterations                                 100
  Convergence criterion                                  0.100D-05
Optimization Specifications for the EM Algorithm
  Maximum number of iterations                                 500
  Convergence criteria
    Loglikelihood change                                 0.100D-06
    Relative loglikelihood change                        0.100D-06
    Derivative                                           0.100D-05
Optimization Specifications for the M step of the EM Algorithm for
Categorical Latent variables
  Number of M step iterations                                    1
  M step convergence criterion                           0.100D-05
  Basis for M step termination                           ITERATION
Optimization Specifications for the M step of the EM Algorithm for
Censored, Binary or Ordered Categorical (Ordinal), Unordered
Categorical (Nominal) and Count Outcomes
  Number of M step iterations                                    1
  M step convergence criterion                           0.100D-05
  Basis for M step termination                           ITERATION
  Maximum value for logit thresholds                            15
  Minimum value for logit thresholds                           -15
  Minimum expected cell size for chi-square              0.100D-01
Optimization algorithm                                         EMA
Parameterization                                         LOGLINEAR
Link                                                         LOGIT





MODEL FIT INFORMATION

Number of Free Parameters                        5

Loglikelihood

    H0 Value

        Mean                              -969.990
        Std Dev                              0.000
        Number of successful computations        1

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

Information Criteria

    Akaike (AIC)

        Mean                              1949.981
        Std Dev                              0.000
        Number of successful computations        1

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

    Bayesian (BIC)

        Mean                              1971.054
        Std Dev                              0.000
        Number of successful computations        1

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

    Sample-Size Adjusted BIC (n* = (n + 2) / 24)

        Mean                              1955.183
        Std Dev                              0.000
        Number of successful computations        1

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

Chi-Square Test of Model Fit for the Binary and Ordered Categorical
(Ordinal) Outcomes

    Pearson Chi-Square

        Mean                                 1.066
        Std Dev                              0.000
        Degrees of freedom                       2
        Number of successful computations        1

             Proportions                   Percentiles
        Expected    Observed         Expected       Observed
           0.990       1.000            0.020          1.066
           0.980       1.000            0.040          1.066
           0.950       1.000            0.103          1.066
           0.900       1.000            0.211          1.066
           0.800       1.000            0.446          1.066
           0.700       1.000            0.713          1.066
           0.500       0.000            1.386          1.066
           0.300       0.000            2.408          1.066
           0.200       0.000            3.219          1.066
           0.100       0.000            4.605          1.066
           0.050       0.000            5.991          1.066
           0.020       0.000            7.824          1.066
           0.010       0.000            9.210          1.066

    Likelihood Ratio Chi-Square

        Mean                                 1.068
        Std Dev                              0.000
        Degrees of freedom                       2
        Number of successful computations        1

             Proportions                   Percentiles
        Expected    Observed         Expected       Observed
           0.990       1.000            0.020          1.068
           0.980       1.000            0.040          1.068
           0.950       1.000            0.103          1.068
           0.900       1.000            0.211          1.068
           0.800       1.000            0.446          1.068
           0.700       1.000            0.713          1.068
           0.500       0.000            1.386          1.068
           0.300       0.000            2.408          1.068
           0.200       0.000            3.219          1.068
           0.100       0.000            4.605          1.068
           0.050       0.000            5.991          1.068
           0.020       0.000            7.824          1.068
           0.010       0.000            9.210          1.068



MODEL RESULTS USE THE LATENT CLASS VARIABLE ORDER

   C1  C2  C3


FINAL CLASS COUNTS AND PROPORTIONS FOR THE LATENT CLASS PATTERNS
BASED ON THE ESTIMATED MODEL

  Latent Class
    Pattern

    1  1  1        140.22261          0.28045
    1  1  2         39.81815          0.07964
    1  2  1         62.77744          0.12555
    1  2  2         44.18181          0.08836
    2  1  1         98.77748          0.19755
    2  1  2         33.18179          0.06636
    2  2  1         44.22252          0.08845
    2  2  2         36.81818          0.07364


FINAL CLASS COUNTS AND PROPORTIONS FOR EACH LATENT CLASS VARIABLE
BASED ON THE ESTIMATED MODEL

  Latent Class
    Variable    Class

    C1             1       287.00003          0.57400
                   2       212.99997          0.42600
    C2             1       312.00003          0.62400
                   2       187.99995          0.37600
    C3             1       346.00006          0.69200
                   2       153.99994          0.30800


FINAL CLASS COUNTS AND PROPORTIONS FOR THE LATENT CLASS PATTERNS
BASED ON ESTIMATED POSTERIOR PROBABILITIES

  Latent Class
    Pattern

    1  1  1        140.00007          0.28000
    1  1  2         42.99996          0.08600
    1  2  1         62.99999          0.12600
    1  2  2         41.00000          0.08200
    2  1  1         99.00002          0.19800
    2  1  2         29.99998          0.06000
    2  2  1         43.99998          0.08800
    2  2  2         39.99999          0.08000


FINAL CLASS COUNTS AND PROPORTIONS FOR EACH LATENT CLASS VARIABLE
BASED ON ESTIMATED POSTERIOR PROBABILITIES

  Latent Class
    Variable    Class

    C1             1       287.00003          0.57400
                   2       212.99997          0.42600
    C2             1       312.00003          0.62400
                   2       187.99995          0.37600
    C3             1       346.00006          0.69200
                   2       153.99994          0.30800


FINAL CLASS COUNTS AND PROPORTIONS FOR THE LATENT CLASS PATTERNS
BASED ON THEIR MOST LIKELY LATENT CLASS PATTERN

Class Counts and Proportions

  Latent Class
    Pattern

    1  1  1              140          0.28000
    1  1  2               43          0.08600
    1  2  1               63          0.12600
    1  2  2               41          0.08200
    2  1  1               99          0.19800
    2  1  2               30          0.06000
    2  2  1               44          0.08800
    2  2  2               40          0.08000


FINAL CLASS COUNTS AND PROPORTIONS FOR EACH LATENT CLASS VARIABLE
BASED ON THEIR MOST LIKELY LATENT CLASS PATTERN

  Latent Class
    Variable    Class

    C1             1             287          0.57400
                   2             213          0.42600
    C2             1             312          0.62400
                   2             188          0.37600
    C3             1             346          0.69200
                   2             154          0.30800


CLASSIFICATION QUALITY

     Entropy                         1.000


MODEL RESULTS

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

Parameters for Class-specific Model Parts of C1

Latent Class C1#1

 Thresholds
  U1$1               15.000    15.0000     0.0000     0.0000     0.0000 1.000 0.000

Latent Class C1#2

 Thresholds
  U1$1              -15.000   -15.0000     0.0000     0.0000     0.0000 1.000 0.000

Parameters for Class-specific Model Parts of C2

Latent Class C2#1

 Thresholds
  U2$1               15.000    15.0000     0.0000     0.0000     0.0000 1.000 0.000

Latent Class C2#2

 Thresholds
  U2$1              -15.000   -15.0000     0.0000     0.0000     0.0000 1.000 0.000

Parameters for Class-specific Model Parts of C3

Latent Class C3#1

 Thresholds
  U3$1               15.000    15.0000     0.0000     0.0000     0.0000 1.000 0.000

Latent Class C3#2

 Thresholds
  U3$1              -15.000   -15.0000     0.0000     0.0000     0.0000 1.000 0.000

Categorical Latent Variables

 C1#1     WITH
  C3#1                0.500     0.1680     0.0000     0.1952     0.1102 1.000 0.000

 C2#1     WITH
  C3#1                0.750     0.9076     0.0000     0.1989     0.0248 1.000 1.000

 Means
  C1#1                0.000     0.1823     0.0000     0.1618     0.0332 1.000 0.000
  C2#1                0.000    -0.1040     0.0000     0.1614     0.0108 1.000 0.000
  C3#1                0.000     0.1832     0.0000     0.1862     0.0336 1.000 0.000


QUALITY OF NUMERICAL RESULTS

     Average Condition Number for the Information Matrix      0.412E-01
       (ratio of smallest to largest eigenvalue)


C-SPECIFIC CLASSIFICATION RESULTS

Classification Quality for C1

     Entropy                         1.000

Average Latent Class Probabilities for Most Likely Latent Class Membership (Row)
by Latent Class (Column)

           1        2

    1   1.000    0.000
    2   0.000    1.000

Classification Quality for C2

     Entropy                         1.000

Average Latent Class Probabilities for Most Likely Latent Class Membership (Row)
by Latent Class (Column)

           1        2

    1   1.000    0.000
    2   0.000    1.000

Classification Quality for C3

     Entropy                         1.000

Average Latent Class Probabilities for Most Likely Latent Class Membership (Row)
by Latent Class (Column)

           1        2

    1   1.000    0.000
    2   0.000    1.000


TECHNICAL 1 OUTPUT


     PARAMETER SPECIFICATION FOR LATENT CLASS PATTERN 1 1 1


     PARAMETER SPECIFICATION FOR LATENT CLASS PATTERN 1 1 2


     PARAMETER SPECIFICATION FOR LATENT CLASS PATTERN 1 2 1


     PARAMETER SPECIFICATION FOR LATENT CLASS PATTERN 1 2 2


     PARAMETER SPECIFICATION FOR LATENT CLASS PATTERN 2 1 1


     PARAMETER SPECIFICATION FOR LATENT CLASS PATTERN 2 1 2


     PARAMETER SPECIFICATION FOR LATENT CLASS PATTERN 2 2 1


     PARAMETER SPECIFICATION FOR LATENT CLASS PATTERN 2 2 2


     PARAMETER SPECIFICATION FOR LATENT CLASS INDICATOR MODEL PART


           TAU(U) FOR LATENT CLASS PATTERN 1 1 1
              U1$1          U2$1          U3$1
              ________      ________      ________
                    0             0             0


           TAU(U) FOR LATENT CLASS PATTERN 1 1 2
              U1$1          U2$1          U3$1
              ________      ________      ________
                    0             0             0


           TAU(U) FOR LATENT CLASS PATTERN 1 2 1
              U1$1          U2$1          U3$1
              ________      ________      ________
                    0             0             0


           TAU(U) FOR LATENT CLASS PATTERN 1 2 2
              U1$1          U2$1          U3$1
              ________      ________      ________
                    0             0             0


           TAU(U) FOR LATENT CLASS PATTERN 2 1 1
              U1$1          U2$1          U3$1
              ________      ________      ________
                    0             0             0


           TAU(U) FOR LATENT CLASS PATTERN 2 1 2
              U1$1          U2$1          U3$1
              ________      ________      ________
                    0             0             0


           TAU(U) FOR LATENT CLASS PATTERN 2 2 1
              U1$1          U2$1          U3$1
              ________      ________      ________
                    0             0             0


           TAU(U) FOR LATENT CLASS PATTERN 2 2 2
              U1$1          U2$1          U3$1
              ________      ________      ________
                    0             0             0


     PARAMETER SPECIFICATION FOR LATENT CLASS REGRESSION MODEL PART


           ALPHA(C)
              C1#1          C1#2          C2#1          C2#2          C3#1
              ________      ________      ________      ________      ________
                    1             0             2             0             3


           ALPHA(C)
              C3#2
              ________
                    0


           PSI(C)
              C1#1          C1#2
              ________      ________
 C3#1               4             0
 C3#2               0             0


           PSI(C)
              C2#1          C2#2
              ________      ________
 C3#1               5             0
 C3#2               0             0


     STARTING VALUES FOR LATENT CLASS PATTERN 1 1 1


     STARTING VALUES FOR LATENT CLASS PATTERN 1 1 2


     STARTING VALUES FOR LATENT CLASS PATTERN 1 2 1


     STARTING VALUES FOR LATENT CLASS PATTERN 1 2 2


     STARTING VALUES FOR LATENT CLASS PATTERN 2 1 1


     STARTING VALUES FOR LATENT CLASS PATTERN 2 1 2


     STARTING VALUES FOR LATENT CLASS PATTERN 2 2 1


     STARTING VALUES FOR LATENT CLASS PATTERN 2 2 2


     STARTING VALUES FOR LATENT CLASS INDICATOR MODEL PART


           TAU(U) FOR LATENT CLASS PATTERN 1 1 1
              U1$1          U2$1          U3$1
              ________      ________      ________
               15.000        15.000        15.000


           TAU(U) FOR LATENT CLASS PATTERN 1 1 2
              U1$1          U2$1          U3$1
              ________      ________      ________
               15.000        15.000       -15.000


           TAU(U) FOR LATENT CLASS PATTERN 1 2 1
              U1$1          U2$1          U3$1
              ________      ________      ________
               15.000       -15.000        15.000


           TAU(U) FOR LATENT CLASS PATTERN 1 2 2
              U1$1          U2$1          U3$1
              ________      ________      ________
               15.000       -15.000       -15.000


           TAU(U) FOR LATENT CLASS PATTERN 2 1 1
              U1$1          U2$1          U3$1
              ________      ________      ________
              -15.000        15.000        15.000


           TAU(U) FOR LATENT CLASS PATTERN 2 1 2
              U1$1          U2$1          U3$1
              ________      ________      ________
              -15.000        15.000       -15.000


           TAU(U) FOR LATENT CLASS PATTERN 2 2 1
              U1$1          U2$1          U3$1
              ________      ________      ________
              -15.000       -15.000        15.000


           TAU(U) FOR LATENT CLASS PATTERN 2 2 2
              U1$1          U2$1          U3$1
              ________      ________      ________
              -15.000       -15.000       -15.000


     STARTING VALUES FOR LATENT CLASS REGRESSION MODEL PART


           ALPHA(C)
              C1#1          C1#2          C2#1          C2#2          C3#1
              ________      ________      ________      ________      ________
                0.000         0.000         0.000         0.000         0.000


           ALPHA(C)
              C3#2
              ________
                0.000


           PSI(C)
              C1#1          C1#2
              ________      ________
 C3#1           0.500         0.000
 C3#2           0.000         0.000


           PSI(C)
              C2#1          C2#2
              ________      ________
 C3#1           0.750         0.000
 C3#2           0.000         0.000


     POPULATION VALUES FOR LATENT CLASS PATTERN 1 1 1


     POPULATION VALUES FOR LATENT CLASS PATTERN 1 1 2


     POPULATION VALUES FOR LATENT CLASS PATTERN 1 2 1


     POPULATION VALUES FOR LATENT CLASS PATTERN 1 2 2


     POPULATION VALUES FOR LATENT CLASS PATTERN 2 1 1


     POPULATION VALUES FOR LATENT CLASS PATTERN 2 1 2


     POPULATION VALUES FOR LATENT CLASS PATTERN 2 2 1


     POPULATION VALUES FOR LATENT CLASS PATTERN 2 2 2


     POPULATION VALUES FOR LATENT CLASS INDICATOR MODEL PART


           TAU(U) FOR LATENT CLASS PATTERN 1 1 1
              U1$1          U2$1          U3$1
              ________      ________      ________
               15.000        15.000        15.000


           TAU(U) FOR LATENT CLASS PATTERN 1 1 2
              U1$1          U2$1          U3$1
              ________      ________      ________
               15.000        15.000       -15.000


           TAU(U) FOR LATENT CLASS PATTERN 1 2 1
              U1$1          U2$1          U3$1
              ________      ________      ________
               15.000       -15.000        15.000


           TAU(U) FOR LATENT CLASS PATTERN 1 2 2
              U1$1          U2$1          U3$1
              ________      ________      ________
               15.000       -15.000       -15.000


           TAU(U) FOR LATENT CLASS PATTERN 2 1 1
              U1$1          U2$1          U3$1
              ________      ________      ________
              -15.000        15.000        15.000


           TAU(U) FOR LATENT CLASS PATTERN 2 1 2
              U1$1          U2$1          U3$1
              ________      ________      ________
              -15.000        15.000       -15.000


           TAU(U) FOR LATENT CLASS PATTERN 2 2 1
              U1$1          U2$1          U3$1
              ________      ________      ________
              -15.000       -15.000        15.000


           TAU(U) FOR LATENT CLASS PATTERN 2 2 2
              U1$1          U2$1          U3$1
              ________      ________      ________
              -15.000       -15.000       -15.000


     POPULATION VALUES FOR LATENT CLASS REGRESSION MODEL PART


           ALPHA(C)
              C1#1          C1#2          C2#1          C2#2          C3#1
              ________      ________      ________      ________      ________
                0.000         0.000         0.000         0.000         0.000


           ALPHA(C)
              C3#2
              ________
                0.000


           PSI(C)
              C1#1          C1#2
              ________      ________
 C3#1           0.500         0.000
 C3#2           0.000         0.000


           PSI(C)
              C2#1          C2#2
              ________      ________
 C3#1           0.750         0.000
 C3#2           0.000         0.000


TECHNICAL 8 OUTPUT


  TECHNICAL 8 OUTPUT FOR REPLICATION 1


   E STEP  ITER  LOGLIKELIHOOD    ABS CHANGE   REL CHANGE  ALGORITHM
              1 -0.97226043D+03    0.0000000    0.0000000  EM
              2 -0.96999552D+03    2.2649052    0.0023295  EM
              3 -0.96999030D+03    0.0052263    0.0000054  EM
              4 -0.96999030D+03    0.0000000    0.0000000  EM


TECHNICAL 9 OUTPUT

  Error messages for each replication (if any)



SAVEDATA INFORMATION

  Order of variables

    U1
    U2
    U3
    C1
    C2
    C3

  Save file
    ex7.15.dat

  Save file format           Free
  Save file record length    10000


     Beginning Time:  22:24:29
        Ending Time:  22:24:29
       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