Hello  When trying to run latent class analysis, I obtained an error:
STATS LATENT CLASS MANIFESTVARS=Q14_4bi Q14_6bi Q14_12bi Q15_3bi Q15_5bi Q15_6bi Q15_8bi Q16_2bi
>Error # 1. Command name: STATS
>The first word in the line is not recognized as an SPSS Statistics command.
>Execution of this command stops.
Q16_3bi Q16_5bi
CLASSES=3
/OPTIONS MISSING=INCLUDE REPETITIONS=10 MAXITER=1000 TOL=.0000000001
/OUTPUT GRAPHS=YES
/SAVE PREDCELLDS=lca.
What do I need to do?
Thanks,
Hiro
Topic
This topic has been locked.

Re: Error when using latent class analysis with spss20
20120418T01:35:10ZThis is the accepted answer. This is the accepted answer.That error means that the STATS LATENT CLASS command is not installed. You have to download it from the Community site and install the extension bundle. If you did that, you probably didn't have write permission to the necessary directory.
Look in the Statistics extension directory for the file STATS_LATENT_CLASS.xml. That makes the command recognizable.
Also remember that you have to restart Statistics before it will recognize a newly install extension command.
HTH,
Jon Peck 
Re: Error when using latent class analysis with spss20
20120418T02:04:31ZThis is the accepted answer. This is the accepted answer. SystemAdmin
 20120418T01:35:10Z
That error means that the STATS LATENT CLASS command is not installed. You have to download it from the Community site and install the extension bundle. If you did that, you probably didn't have write permission to the necessary directory.
Look in the Statistics extension directory for the file STATS_LATENT_CLASS.xml. That makes the command recognizable.
Also remember that you have to restart Statistics before it will recognize a newly install extension command.
HTH,
Jon Peck
Now I have a new error msg:
STATS LATENT CLASS MANIFESTVARS=Q14_1bi2 Q14_2bi2 Q14_3bi2 Q14_4bi2 Q14_5bi2 Q14_6bi2 Q14_7bi2
Q14_8bi2 Q14_9bi2 Q14_10bi2 Q14_11bi2 Q14_12bi2 Q14_13bi2 Q15_1bi2 Q15_2bi2 Q15_3bi2 Q15_4bi2
Q15_5bi2 Q15_6bi2 Q15_7bi2 Q15_8bi2 Q16_1bi2 Q16_2bi2 Q16_3bi2 Q16_4bi2 Q16_5bi2 Q16_6bi2 Q16_7bi2
Q16_8bi2 Q16_9bi2
CLASSES=3
/OPTIONS MISSING=INCLUDE REPETITIONS=10 MAXITER=1000 TOL=.0000000001
/OUTPUT GRAPHS=YES.
Error in terms.formula(object, data = data) :
variable names are limited to 256 bytes
Does this mean I need to shorten each variable name? Thanks. 
Re: Error when using latent class analysis with spss20
20120418T02:16:26ZThis is the accepted answer. This is the accepted answer. hryamada
 20120418T02:04:31Z
Hello Jon  As you suggested, I needed to restart SPSS.
Now I have a new error msg:
STATS LATENT CLASS MANIFESTVARS=Q14_1bi2 Q14_2bi2 Q14_3bi2 Q14_4bi2 Q14_5bi2 Q14_6bi2 Q14_7bi2
Q14_8bi2 Q14_9bi2 Q14_10bi2 Q14_11bi2 Q14_12bi2 Q14_13bi2 Q15_1bi2 Q15_2bi2 Q15_3bi2 Q15_4bi2
Q15_5bi2 Q15_6bi2 Q15_7bi2 Q15_8bi2 Q16_1bi2 Q16_2bi2 Q16_3bi2 Q16_4bi2 Q16_5bi2 Q16_6bi2 Q16_7bi2
Q16_8bi2 Q16_9bi2
CLASSES=3
/OPTIONS MISSING=INCLUDE REPETITIONS=10 MAXITER=1000 TOL=.0000000001
/OUTPUT GRAPHS=YES.
Error in terms.formula(object, data = data) :
variable names are limited to 256 bytes
Does this mean I need to shorten each variable name? Thanks.
Jon Peck 
Re: Error when using latent class analysis with spss20
20120418T02:35:13ZThis is the accepted answer. This is the accepted answer. SystemAdmin
 20120418T02:16:26Z
No, but the formula expression being generated for the latent class model is pretty complicated. Can you upload a small dataset that has all these variables defined so that I can see what that formula looks like?
Jon Peckyes/nodata into 1,2, b/c the latent class module asks for positive integers). Thanks.Attachments

Re: Error when using latent class analysis with spss20
20120418T02:55:17ZThis is the accepted answer. This is the accepted answer. hryamada
 20120418T02:35:13Z
Jon  Attached, please find the spss file. The data are dichotomous (I recoded 1,0yes/nodata into 1,2, b/c the latent class module asks for positive integers). Thanks.
For now, try this with just a few variables. The R code is constructing some internal variables, and shortening the names might help, but I won't know until I dig deeper.
Regards,
Jon Peck 
Re: Error when using latent class analysis with spss20
20120418T03:03:15ZThis is the accepted answer. This is the accepted answer. SystemAdmin
 20120418T02:55:17Z
I can reproduce the error using your file. It is happening in the R code estimating the model. I'll dig into this, but not tonight.
For now, try this with just a few variables. The R code is constructing some internal variables, and shortening the names might help, but I won't know until I dig deeper.
Regards,
Jon Peck 
Re: Error when using latent class analysis with spss20
20120418T19:30:03ZThis is the accepted answer. This is the accepted answer. SystemAdmin
 20120418T02:55:17Z
I can reproduce the error using your file. It is happening in the R code estimating the model. I'll dig into this, but not tonight.
For now, try this with just a few variables. The R code is constructing some internal variables, and shortening the names might help, but I won't know until I dig deeper.
Regards,
Jon Peck
HTH,
Jon Peck 
Re: Error when using latent class analysis with spss20
20120418T22:49:46ZThis is the accepted answer. This is the accepted answer. SystemAdmin
 20120418T19:30:03Z
I see that shortening the variable names does allow the procedure to complete, although it doesn't do much for the quality of the output. I have contacted the author of the underlying R package, and he is investigating.
HTH,
Jon Peck
Regards,
Hiro