Errors when computing multiple categorical variables

Welcome to the forum for REALCOM users. Feel free to post your question about REALCOM here. The Centre for Multilevel Modelling take no responsibility for the accuracy of these posts, we are unable to monitor them closely. Do go ahead and post your question and thank you in advance if you find the time to post any answers!

Go REALCOM (Developing multilevel models for REAListically COMplex social science data) >> http://www.bristol.ac.uk/cmm/software/realcom/
Post Reply
jlgriffin
Posts: 1
Joined: Mon Nov 04, 2013 8:32 pm

Errors when computing multiple categorical variables

Post by jlgriffin »

I'm trying to impute several variables. Most are dichotomous, one is continuous, and one is ordered categorical with 6 categories. I specify these response types using the "Specify type of response" button. After clicking "Start MCMC run", I get the following error messages:

Error using svd
Input to SVD must not contain NaN or Inf.
Error in pinv <line 29>
Error in mcmcdriver <line 698>
Error in gui_2levmixresp>pushbutton16_RunMCMC_Callback <line 264>
Error in gui_mainfcn <line 96>
Error in gui_2levmixresp <line 46>
Error in @<hObject,eventdata>gui_2levmixresp<'pushbutton16_RunMCMC_Callback',hObject,eventdata,guidata<hObject>>
Error while evaluating uicontrol Callback

Furthermore, the program does not appear to be identifying the 6-level ordered categorical variable as such; rather, only 3 categories are indicated in the log:

NRTYPE =
3 <----should have 6 categories
2
2
2
2
2
2
2
1

Please advise.

Thanks so much,
Jamie
ChrisCharlton
Posts: 1348
Joined: Mon Oct 19, 2009 10:34 am

Re: Errors when computing multiple categorical variables

Post by ChrisCharlton »

The NRTYPE variable sets the type of response rather than the number of categories, valid values are:

1: Normal
2: Unordered
3: Ordered

The variable that holds number number of categories is NCAT.

You should be able to check/set the number of categories from the same screen where you specified the type of response. If changing the number of categories to match your data doesn't fix the problem then let us know and we should be able look into this further.
AlexandderWuttke
Posts: 5
Joined: Tue Jul 21, 2015 9:32 am

Re: Errors when computing multiple categorical variables

Post by AlexandderWuttke »

I´ve encountered this error message as well.
After deleting variable by variable I could isolate the causes to having to do with three specific auxiliary variables. The error is not related to the response variable or the level of the response variable. The error seems to be that the categorical aux vars dont start with 0 (but with 1 in my case). Recoding solves the problem.
ChrisCharlton
Posts: 1348
Joined: Mon Oct 19, 2009 10:34 am

Re: Errors when computing multiple categorical variables

Post by ChrisCharlton »

I find this a bit puzzling as Realcom does not have a concept of categorical auxiliary variables. Auxiliary variables are all treated as continuous so any categorical auxiliary variables have to be sent to Realcom-Impute as dummies, in which case the coding shouldn't matter.
AlexandderWuttke
Posts: 5
Joined: Tue Jul 21, 2015 9:32 am

Re: Errors when computing multiple categorical variables

Post by AlexandderWuttke »

True. Thanks for clarifying my mistake.

I just wanted to point out the practical hint that I avoided the error message by making sure that all my variables start with zero (which wasn´t the case in my dataset and might happen to others as well when playing around and testing).
Post Reply