Page 1 of 1

Strange predicted values

Posted: Thu Dec 10, 2020 6:10 pm
by thvdnhee

I'm currently taking an intro to multilevel modelling class in my university and I'm having trouble making sense of some off my graphs.

The model is trying to explain the influence of age, GDP per capita in ppp (country level variable), gender (dummy variable on individual level), gender*age and GDP per capita in ppp*age on responsibility at work (a scale variable I made through factor analysis). It's a random slope model where all the variables are standardized and the slope is allowed to vary from country to country based on age.

When I'm making a graph of the predicted values of the model on age I'm getting weird lines.

I do get a desired graph when I remove the variables Gender and Gender*age (graph mentioned below). I would love to keep these variables in my model though since de -2log likelihood is much lower when they are added to the model. How can I make my prediction a straight line instead of the above mentioned chaos? Or can the above mentioned graph be reported in a paper?


Re: Strange predicted values

Posted: Sat Dec 19, 2020 1:05 pm
by ChrisCharlton
It looks like each line of your graph contains predictions for both genders, in a similar way to how the line on page 57 of the MLwiN user's guide ( ... al-web.pdf) contains predictions for all of the different schools. I think that the workaround for this would be to either change your grouping variable to one that contains a different code for each combination of group and gender, or to use the gender variable for the "row code" or "column code" option so that each gender is plotted on a different graph.