Hello, back SAS community,
Why can we not run more than one response variable in the model line when performing a model using a mixed procedure?
For example, if we want to try something other to gain according to school ....it will be an error. How to do this, please?
proc mixed data=test_scores;
class school ethnicity gender teacher;
model gain = school ethnicity gender / solution;
random int / subject=teacher;
run;
thank you for your reply, so in this case. we try one by one ...
You could repeat the code, but modifying the response variable.
Thank you for your answer. So why in GLM we can test multiple response variables and multiple factors but in the mixed only one response variable and multiple factors? The mixed model is not more sophisticated.
Why? Does it matter? You can't do it in MIXED, so the solution is to run MIXED several times.
If you really need to know why, perhaps @Rick_SAS or @StatDave has an explanation.
"The mixed model is not more sophisticated" -- again, does it matter, MIXED does what it does.
And actually it is with respect to estimating the effect of the X-variables, a lot more sophisticated models can be fit with MIXED than you can fit with GLM.
Thanks a lot for your answer. It is only to know this information which you are giving...
Hey everyone - there is a way to use PROC MIXED to fit multiple response variables. A good example can be found in the documentation for the TYPE= option for the REPEATED statement. Look at TYPE=UN@AR(1), where Height and Weight for children measured over time is given. The code suggested is:
proc mixed;
class Var Year Child;
model Y = Var Year Var*Year;
repeated Var Year / type=un@ar(1)
subject=Child;
run;
A similar situation is included in the PROC GLIMMIX documentation, but is much more difficult to implement. Start with the example: Joint Modeling of Binary and Count Data. Note that this approach requires different distribution types for each of the dependent variables, which is not required for the PROC MIXED method.
SteveDenham
ANOVA, or Analysis Of Variance, is used to compare the averages or means of two or more populations to better understand how they differ. Watch this tutorial for more.
Find more tutorials on the SAS Users YouTube channel.