Stata MIXED Extract Intercept, Slope

39 views Asked by At
mixed weight week || id: week
predict u1 u0, reffects
generate intercept = _b[_cons] + u0
generate slope = _b[week] + u1

If I wish for to estimate and store id-specific intercept and slope I can use the code above, but when I do it with week-squared (week2) I get errors...

mixed weight week week2 || id: week week2
predict u1 u0, reffects
generate intercept = _b[_cons] + u0
generate slope = _b[week] + u1
0

There are 0 answers