  
  ** Mx startup successful **
  
   **Mx-OSX version 1.69**
 !------------------------------------------------------+
 ! Latent class analysis via Mx                         |
 ! marginal ml again                                    |
 ! data from http://www.people.vcu.edu/~nhenry/LSA50.htm|
 ! see                                                  |
 ! Latent Class Probs Item 1 Item 2 Item 3 Item 4       |
 ! .4243              .9240 .6276 .5704 .5125           |
 ! .5757              .4324 .1871 .1008 .0635           |
 ! Mx recovers:                                         |
 ! .4440    0.90736    0.61444    0.55828    0.50176    |
 ! .5560    0.42838    0.18218    .09394      .05627    |
 !------------------------------------------------------+
 
 #ngroups  2    ! number of groups in run
 
 
 The following MX script lines were read for group    1
 
 #NGROUPS  2
  Note: #NGroup set number of groups to           2
  
 #define $nvar 5  ! Number of variables altogether, before selection
 #define nclass 2
 #define $nclass 2
 #define nv 4    ! number of variables in model
 #define ncov 0   ! number of covariates
 #define nclassncov 0 ! nclass * ncov
 #define ncnv 8  ! number of variables * number of classes
 #define $allvar1 Armyrun Favatt squaredeal welfare freq
 #define $covariates FHTTLPR1 FHTTLPR2
 #define $variables Armyrun Favatt squaredeal welfare freq
 #define $frequencies TRUE
 #define $freqlabel freq
 #define maxcat 1  ! Maximum score of any item
 #define maxcatnc 2  ! Must be maxcat times nclass
 !-------------------------------------------------------------------
 Group 1: Fit the model
  Data Ninput=$nvar  Nmodel=$nclass
  ORdinal File=lazarsfeld.ord
  Ordinal data read initiated
  Note: Maximum ordinal/rectangular record length is:         1000
  Note: It be increased by maxrec= parameter on the data line.
  
  NOTE: Rectangular file contained    16 records with data
        that contained a total of     80 observations
  
  LAbels
 $allvar1
 
 !Select if sex = 0
  SElect
 #if ncov > 0
  $variables
  $covariates ;
  Definition $covariates ;
 #else
  $variables  ;
 #endif
 #if $frequencies = TRUE
  Definition $freqlabel  ;
  
  NOTE: Selection yields   16 data vectors for analysis
  NOTE: Vectors contain a total of    80 observations
  
  
  NOTE: Definition yields   16 data vectors for analysis
  NOTE: Vectors contain a total of    64 observations
  
 #end if
 
   Begin matrices;
  
     A full nclass 1
  #if ncov > 0
     P unit nv ncov
     K Full nv nclassncov  ! regressions of response probabilities on covariates
     S full ncov 1   ! vector of observed covariates
     X full nclass ncov    ! For regression of class membership probs on covaria
 tes
  #else
     P unit nv 1
     K Full nv nclass     ! Not required except to make algebra work with no cov
 ariates
     D full 1 1      ! Not required except to make algebra work
     S full 1 1      ! Not required except to make algebra work
     X full nclass 1    ! For regression of class membership probs on covariates
  #endif
     E full 1 nv
     F unit maxcat 1
     G lower maxcat maxcat
     T full maxcatnc nv Free  ! thresholds, z-score metric for class probabiliti
 es
                              ! note that columns are thresholds within variable
 s
     I iden nclass nclass
     Q full 1 1               ! for frequency if used
     R iden nv nv
     U unit 1 1
     V unit nv 1
     W full nclass 1 free  ! class membership probabilities
   End Matrices;
  !
  ! Be kind to Mx, fix thresholds that are not going anywhere
  !
   Value 1 G 1 1 - G maxcat maxcat
  #if ncov > 0
   Specify S $covariates
  #endif
  #if $frequencies = TRUE
   Specify Q $freqlabel
  #end if
   Matrix W .2 .8
 
   Begin Algebra;
   End Algebra;
 
   Thresholds  (I@G)*T+(K*(I@S))' ;
   Covariance  R;
  #if $frequencies = TRUE
    Frequency Q;
  #end if
  #if ncov > 0
    Specify S $covariates
   #endif
   #if $frequencies = TRUE
    Specify Q $freqlabel
   #end if
    Matrix W .2 .8
 
    Begin Algebra;
    End Algebra;
 
    Thresholds  (I@G)*T+(K*(I@S))' ;
    Covariance  R;
   #if $frequencies = TRUE
     Frequency Q;
   #end if
   #if ncov > 0
    Weight      (W+X*S)@(\sum(W+X*S)~);  ! adjusted for covariates
   #else
    Weight      W ;
   #endif
    Option onecov
    Option func=1.e-9
   End Group;
 
 
 The following MX script lines were read for group    2
 
 
   Constrain Un-regressed Weights to sum to 1
    Constraint
    Begin Matrices;
     W full nclass 1 = W1
     I unit 1 1
    End Matrices;
 
    Constraint I = \sum(W);
   End
  
  
  Summary of VL file data for group            1
  
                 FREQ    ARMYRUN     FAVATT SQUAREDEAL    WELFARE
     Code     -1.0000     1.0000     2.0000     3.0000     4.0000
   Number     16.0000    16.0000    16.0000    16.0000    16.0000
     Mean     62.5000     0.5000     0.5000     0.5000     0.5000
 Variance   3973.2500     0.2500     0.2500     0.2500     0.2500
  Minimum      3.0000     0.0000     0.0000     0.0000     0.0000
  Maximum    229.0000     1.0000     1.0000     1.0000     1.0000
  
  
  PARAMETER SPECIFICATIONS
  
  GROUP NUMBER:           1
  
Group 1: Fit the model                                                                                                          
  
  MATRIX A
 This is a FULL matrix of order    2 by    1
  It has no free parameters specified
  
  MATRIX D
 This is a FULL matrix of order    1 by    1
  It has no free parameters specified
  
  MATRIX E
 This is a FULL matrix of order    1 by    4
  It has no free parameters specified
  
  MATRIX F
 This is a UNIT matrix of order    1 by    1
  
  MATRIX G
 This is a LOWER TRIANGULAR matrix of order    1 by    1
  It has no free parameters specified
  
  MATRIX I
 This is an IDENTITY matrix of order    2 by    2
  
  MATRIX K
 This is a FULL matrix of order    4 by    2
  It has no free parameters specified
  
  MATRIX P
 This is a UNIT matrix of order    4 by    1
  
  MATRIX Q
 This is a FULL matrix of order    1 by    1
     1
 1  -1
  
  MATRIX R
 This is an IDENTITY matrix of order    4 by    4
  
  MATRIX S
 This is a FULL matrix of order    1 by    1
  It has no free parameters specified
  
  MATRIX T
 This is a FULL matrix of order    2 by    4
    1 2 3 4
 1  1 2 3 4
 2  5 6 7 8
  
  MATRIX U
 This is a UNIT matrix of order    1 by    1
  
  MATRIX V
 This is a UNIT matrix of order    4 by    1
  
  MATRIX W
 This is a FULL matrix of order    2 by    1
     1
 1   9
 2  10
  
  MATRIX X
 This is a FULL matrix of order    2 by    1
  It has no free parameters specified
  
  GROUP NUMBER:           2
  
Constrain Un-regressed Weights to sum to 1                                                                                      
  
  MATRIX I
 This is a UNIT matrix of order    1 by    1
  
  MATRIX W
 This is a FULL matrix of order    2 by    1
     1
 1   9
 2  10
  
  Mx starting optimization; number of parameters =           10
  
  
  MX PARAMETER ESTIMATES
  
  GROUP NUMBER:           1
  
Group 1: Fit the model                                                                                                          
  
  MATRIX A
 This is a FULL matrix of order    2 by    1
          1
 1   0.0000
 2   0.0000
  
  MATRIX D
 This is a FULL matrix of order    1 by    1
          1
 1   0.0000
  
  MATRIX E
 This is a FULL matrix of order    1 by    4
          1       2       3       4
 1   0.0000  0.0000  0.0000  0.0000
  
  MATRIX F
 This is a UNIT matrix of order    1 by    1
  
  MATRIX G
 This is a LOWER TRIANGULAR matrix of order    1 by    1
          1
 1   1.0000
  
  MATRIX I
 This is an IDENTITY matrix of order    2 by    2
  
  MATRIX K
 This is a FULL matrix of order    4 by    2
          1       2
 1   0.0000  0.0000
 2   0.0000  0.0000
 3   0.0000  0.0000
 4   0.0000  0.0000
  
  MATRIX P
 This is a UNIT matrix of order    4 by    1
  
  MATRIX Q
 This is a FULL matrix of order    1 by    1
             1
 1    229.0000
  
  MATRIX R
 This is an IDENTITY matrix of order    4 by    4
  
  MATRIX S
 This is a FULL matrix of order    1 by    1
          1
 1   0.0000
  
  MATRIX T
 This is a FULL matrix of order    2 by    4
             1          2          3          4
 1     -1.3247    -0.2909    -0.1466    -0.0044
 2      0.1805     0.9071     1.3169     1.5869
  
  MATRIX U
 This is a UNIT matrix of order    1 by    1
  
  MATRIX V
 This is a UNIT matrix of order    4 by    1
  
  MATRIX W
 This is a FULL matrix of order    2 by    1
          1
 1   0.4440
 2   0.5560
  
  MATRIX X
 This is a FULL matrix of order    2 by    1
          1
 1   0.0000
 2   0.0000
  
  GROUP NUMBER:           2
  
Constrain Un-regressed Weights to sum to 1                                                                                      
  
  MATRIX I
 This is a UNIT matrix of order    1 by    1
  
  MATRIX W
 This is a FULL matrix of order    2 by    1
          1
 1   0.4440
 2   0.5560
  
 Your model has   10 estimated parameters and     65 Observed statistics
 Observed statistics include   1 constraints.
  
 -2 times log-likelihood of data >>>  4696.444
 Degrees of freedom >>>>>>>>>>>>>>>>        55
 Akaike's Information Criterion >>>>  4586.444
 Bayesian Information Criterion >>>>  2271.976
 Sample size Adjusted BIC       >>>>  2356.133
 Deviance Information Criterion >>>>  2322.518
  
 This problem used  0.0% of my workspace
  
 Task                     Time elapsed (DD:HH:MM:SS)
 Reading script & data      0: 0: 0: 0.01
 Execution                  0: 0: 0: 0.03
 TOTAL                      0: 0: 0: 0.04
  
 Total number of warnings issued:           0
 ______________________________________________________________________________
 
 
  
 ______________________________________________________________________________
