BookmarkSubscribeRSS Feed
fatemeh
Quartz | Level 8

hello all,

I have a question about proc mixed when having both fixed and random effect .when i put both random and repeated statement i get warning because of  infinite likelihood when i want output the FitStatistics. repeat statement is for R side and random is for G side but when i put both repeat and random we suppose within subject errors have no correlation the R matrix should be diagonal (σ^2) I. so  to prevent this error should i remove type=cs  statement from proc mixed ? bellow is my code. thanks for any help.

proc mixed data=data;
class Subject time treat ;
model response=time|treat / ddfm=kr;
random Subject(treat);
 repeated time / type=CS subject=Subject(treat)  ;
ods output FitStatistics=Fitcs(rename=(value=cs))
                   Dimensions=Parmcs(rename=(value=Numcs));

run;

 

 

1 REPLY 1
sld
Rhodochrosite | Level 12 sld
Rhodochrosite | Level 12

Both

 

random subject(treat);

and

 

repeated time / type=cs subject=subject(treat);

fit the same covariance structure and to use both in the same model is redundant, causing the model to be overspecified. Use just one or the other.

 

See the paper by Littell et al. (2000)

 

http://onlinelibrary.wiley.com/doi/10.1002/1097-0258(20000715)19:13%3C1793::AID-SIM482%3E3.0.CO;2-Q/...

 

for a good description of the more common covariance types and why you would or would not include both random and repeated statements depending on type.

 

sas-innovate-2026-white.png



April 27 – 30 | Gaylord Texan | Grapevine, Texas

Registration is open

Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!

Register now

What is ANOVA?

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.

Discussion stats
  • 1 reply
  • 2626 views
  • 0 likes
  • 2 in conversation