My model has two levels (level 1: individual; level 2: country). I was trying to fit a random slope model on my data with a continuous outcome. The continuous outcome ranges between 0 and 18. There are around 10 categorical and 5 continuous EVs at level 1 and there are 4 continuous level 2 EVs. The level 1 continuous EVs are all centered to mean. I have the random slope on one of the continuous EV (level 1).
When I was calculating the predicted values, I used the following syntax:
Code: Select all
gen ypred = [FP1]cons + [FP1]EV1*EV1 + u0 + u1* EV1
sort COUNTRY EV1
line ypred EV1, connect(a)
Would anyone be able to give me some advice?
Thanks a lot.
Vivian