Programming the statistical procedures from SAS

Can I specify a predictor as both fixed and random with PROC MIXED

Reply
New Contributor
Posts: 4

Can I specify a predictor as both fixed and random with PROC MIXED

 
Contributor
Posts: 39

Re: Can I specify a predictor as both fixed and random with PROC MIXED

[ Edited ]

Yes, you can. This depends what your desire output is.

For example:

I am predicting time based on a quadratic model of the age of my subjects (reason why I have age and age2, where age2=age*age). If my model includes:

 

model time=age age2;

random int age age2/subject=ind;

 

My output using fixed effect would be the quadratic age trend for an average subject. When you combined the fixed and the random solutions per subject, you would get the quadratic age trend for each of your subjects.

Let me know if this answers your question. 

 

Rita

New Contributor
Posts: 4

Re: Can I specify a predictor as both fixed and random with PROC MIXED

Yes, thanks. I have a second question: what happens if you use a class variable as both fixed and random?



Please type your reply above this line. Simple formatting, no attachments. -##
Contributor
Posts: 39

Re: Can I specify a predictor as both fixed and random with PROC MIXED

Using a class variable, it is like intercepts, the fixed effect will give you the effect for the average subject while the combination of the fixed and random will give you the value for that particular subject. This is assuming you are specifying the random statement per subject.

It might be easier to give you an interpretation if I can see your model. Be aware that sometimes when specifying fixed and random effects and depending on the level of detail of the data, the random effect might be zero, because they are acting as residuals.

regards,

Rita

 

Ask a Question
Discussion stats
  • 3 replies
  • 144 views
  • 0 likes
  • 2 in conversation