!
! ML fitting to raw ordinal data
! Cholesky method, to improve identification
!

#define nvar 2
#define maxcat 3 ! = num thresholds = maximum category, zero must be lowest

Binary data Variable pedigree size ML example.
DAta NInput_vars=nvar NObservations=1000 NGroups=2
Ordinal File=simord.rec

Begin Matrices;
 M FUll Maxcat nvar Free 
 U Lower Maxcat Maxcat  ! Lower Triangular Unit matrix to make t2>t1>t0 etc.
 L Lower nvar nvar Free ! to estimate cholesky
End Matrices;

Matrix M 
.0 .0  
.4 .4 
.6 .6 

Value 1 U 1 1 to U Maxcat Maxcat
Matrix L 1 0 1
Bound 0.01 5  M 2 1 to M Maxcat Nvar ! to make thresholds incremental

Threshold  U*M ;   
Covariance L*L' ;

Option RS
Option func=1.E-10
End

Constrain correlation matrix
 Constraint NI=1
 Begin Matrices = Group 1;
  U Unit 1 nvar
 End Matrices;

 Constraint \d2v(L*L') = U;
End

