TITLE: mix1 DATA: FILE IS bart.dat; VARIABLE: NAMES ARE u1-u4; USEV ARE u1-u4; CATEGORICAL = u1 - u4; CLASSES = c(2); ANALYSIS: TYPE=MIXTURE; MITERATIONS = 100; ! this is a latent class analysis of 4 binary indicators of a ! categorical latent variable with 2 classes ! the default number of E step iterations is reduced from 100 ! to 60 because this example converges quickly even with rough ! starting values MODEL: %OVERALL% %C#1% [u1$1*2 u2$1*2 u3$1*2 u4$1*2]; %C#2% [u1$1*-1 u2$1*-1 u3$1*-1 u4$1*-1]; ! the two lines above refer to the logits of the conditional ! probabilities of u = 1 given latent class 1 and 2, respectively. ! Starting values are required for these parameters. ! Starting values can for example be obtained ! by having lower u probabilities for the first class than for the second ! class. There is no need to provide starting values for the latent class ! probabilities - the default is equal probabilities. As an example of ! giving a starting value with a small probability for class 1 is as ! follows: ! ! [c#1*-2]; ! ! The following shows how to set starting values in the logit scale. ! the relationship between logits and probabilities is ! ! probability = 1/(1+exp(-logit)) ! ! logit = elog(probability/(1-probability)) ! ! which means that ! ! Probability Logit ! 0 -100 (approximately) ! 0.5 0 ! 1 +100 (approximately) OUTPUT: TECH8; ! tech8 is needed to monitor the convergence of mixture modeling