Categorical Variable Error PreviousNext
Mplus Discussion > Categorical Data Modeling >
Message/Author
 Linda Weber posted on Thursday, January 05, 2012 - 4:53 pm
Hi

I am receiving the following error:

*** ERROR
Categorical variable FRNDRAC2R2 contains 36 categories.
This exceeds the maximum allowed of 10.

My code:

DATA:
FILE IS M1_3ascii.dat;
FORMAT IS free;
VARIABLE:
NAMES ARE EuroDiversity trust2 frndrac2r2;
USEVARIABLES EuroDiversity trust2 frndrac2r2;
CATEGORICAL are frndrac2r2;
MISSING ARE ALL (9);
ANALYSIS:
Type=basic;
bootstrap = 5000;
MODEL:
trust2 on Eurodiversity; frndrac2r2 on trust2 EuroDiversity;

MODEL INDIRECT:
frndrac2r2 via trust2 EuroDiversity;
OUTPUT:
cinterval(bcbootstrap);

My input/data example (10 out of about 4,000 cases):

292
901
921
201
201
401
222
202
901
101

My missing are set to 9, and this is a .dat file. Any ideas about why the error. the y is dichotomous.
 Linda K. Muthen posted on Thursday, January 05, 2012 - 6:32 pm
It sounds like you are reading your data incorrectly. You may have blanks in the dataset which is not allowed with free format data. If you can't figure this out, send the relevant files and your license number to support@statmodel.com.
 Linda Weber posted on Friday, January 06, 2012 - 12:04 am
Hi,
I am a novice with Mplus..and did get my bootstrap to work. The problem seemed to be in the onversion of .sav to .dat file (tab delimited or ascii). I converted using .csv according to (
http://www.ats.ucla.edu/stat/mplus/faq/default.htm) and this solved the problem. This may help others who are having the same problem. I was also getting other errors such as "bootstrap not allowed with algorithm= integration" errors that were also resolved once the data was being read properly. Thanks for your help!
 Jon Heron posted on Friday, January 06, 2012 - 3:03 pm
Hi Linda (W)

you might also check out this file conversion program

http://www.danielsoper.com/n2mplus/

I use something similar for Stata files which has the advantage that it also creates you a basic input file so you don't have to worry about copy+pasting the variable names

cheerio, Jon
 Rich Jones posted on Friday, January 06, 2012 - 8:04 pm
Hi Jon,

If you are a Stata user, check out my runmplus ado ("ssc install runmplus" for the original flavor or "net install runmplus, from(http://dl.dropbox.com/u/458793/runmplus/" for the up-to-the-minute flavor).

It is a hack of the stat2mplus.ado, but allows complete specification of an Mplus model, executes Mplus and dumps output back to Stata log window, and saves some results accessible with "return list".

Works on windows, and I have a colleague who made it work on a Mac.

Other Mplus/Stata goodies at

https://sites.google.com/site/lvmworkshop/home/runmplus-stuff


Rich
Back to top
Add Your Message Here
Post:
Username: Posting Information:
This is a private posting area. Only registered users and moderators may post messages here.
Password:
Options: Enable HTML code in message
Automatically activate URLs in message
Action: