Frequently Asked Questions about MLwiN How do I graph slopes of a variable?
Let’s use an example using MLwiN data file popular.ws from Hox’s Multilevel Analysis Techniques and Applications for the illustration. Here is a snapshot of its variables names. There are 100 schools and students are nested in schools. We have a model as follows. The result is: Now we want to plot the 100 school regression slopes for student gender. Based on the model, we will produce predicted values using the Predictions window from Model menu. We are interested in the slopes for variable gender for 100 schools. The predicted values that we want to generate are thus defined as follows. We choose an unused variable c11 and rename it as pred. Now we can click on Calc to store the predicted values in variable pred. Now we are ready to plot it against variable sex. From Graphs menu, select Cumstomised Graph(s). For y-variable, select variable pred and for x-variable, select variable sex. Finally, we select school to be the group variable. The plot is shown below. If we want to know the s