Problem adding quadratic term

Welcome to the forum for MLwiN users. Feel free to post your question about MLwiN software 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!

Remember to check out our extensive software FAQs which may answer your question: http://www.bristol.ac.uk/cmm/software/s ... port-faqs/
Post Reply
RichardS
Posts: 2
Joined: Wed Jul 28, 2021 11:09 am

Problem adding quadratic term

Post by RichardS »

Hi,

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?

Image
ChrisCharlton
Posts: 1348
Joined: Mon Oct 19, 2009 10:34 am

Re: Problem adding quadratic term

Post 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.
RichardS
Posts: 2
Joined: Wed Jul 28, 2021 11:09 am

Re: Problem adding quadratic term

Post by RichardS »

Aha! Works a treat, thanks for the detailed and quick reply Chris :)

Best wishes
Richard
Post Reply