Hi all,
I am running a model using -xtmixed- and then I use -margins- to get the predicted values I need. Below is the command of my model using xtmixed.
then I used margins
As you may notice, the age variable is a continuous variable and I have to get the predicted value of reading performance at the specified 25 age values like the above. My question is how or whether can I still use marginsplot to make graph out of the predicted values that stata gives me? I tried the marginsplot command right after margins command but stata spit out an error message like below:
I guess it's the problem of my age time points, right? But if I have to specify the age to the 25 values like above, can marginsplot be used afterwards?
Thanks!
I am running a model using -xtmixed- and then I use -margins- to get the predicted values I need. Below is the command of my model using xtmixed.
Code:
xtmixed READING age race i.race##c.age || schoolid:, || childid: age, mle cov(un) var pweight(C1_7FC0)
Code:
margins race, at(age=(-0.69 -0.51 -0.35 -0.36 -0.22 -0.11 0 0.41 0.69 0.92 1.10 1.25 1.39 1.50 1.61 1.70 1.79 1.87 1.95 2.01 2.08 2.14 2.19 2.25 2.30)) vsquish predict() post
PHP Code:
invalid at() dimension information;
using variable race as a factor variable and a regular variable is not supported
Thanks!
Comment