Page 1 of 1

Problem adding quadratic term

Posted: Wed Jul 28, 2021 11:15 am
by RichardS

I'm trying to add the quadratic term of time to my model and I get this output, with c1092 instead of time^2. Indeed, I get it whenever I try to add other variables.

Can you advice what the problem might be?


Re: Problem adding quadratic term

Posted: Wed Jul 28, 2021 12:53 pm
by ChrisCharlton
I believe that this is probably due to saving and loading a worksheet containing a model in SPSS format. As the data in SPSS files has to be square MLwiN will fill in gaps with the "missing" value where this is not the case for the data being saved. You can see this from your screenshot with columns c34-c44 containing 406 missing values. MLwiN uses various high valued columns to store model related values such as the current estimates. When you try to add the quadratic term MLwiN will attempt to find the next free column to put the contents of the new predictor in, however as most of the columns are full the first empty column it finds for this is c1092. As it happens c1092 is a column normally reserved by MLwiN for storing the prior information for MCMC models and therefore software is unable to use it. This results in a column that is empty or contains only missing being added to the model (which is why you get the 0 of 406 cases in use message and the different length explanatory variable error).

The workaround would be to remove c1092 from the model, then highlight all the columns that only contain missing values and delete these (via the Delete button in the Data section of the toolbar). Once you have done this you should be able to add your required predictors and run the model as usual.

Re: Problem adding quadratic term

Posted: Wed Jul 28, 2021 2:22 pm
by RichardS
Aha! Works a treat, thanks for the detailed and quick reply Chris :)

Best wishes