HI all
I want to know why random effect didn't work in this proc mixed code,
When I run this code without the random effect it working perfectly
What do you think the main issue in this case?
this is what the log saying:
WARNING: ODS graphics with more than 5000 points have been suppressed. Use the PLOTS(MAXPOINTS= )
option in the PROC MIXED statement to change or override the cutoff.
NOTE: PROCEDURE MIXED used (Total process time):
real time 5.20 seconds
cpu time 5.12 seconds
1568! quit;
Regards
proc mixed data=have;
class pr mfd ca_month CAYEAR CA_EASE city ;
model A = pr mfd mfd*pr ca_month cayear ca_ease CITY;
lsmeans pr mfd mfd*pr/pdiff adjust=tukey;
random herd;
lsmestimate MFD*pr
'MFD 1 v NMFD 1' 1 -1,
'MFD 2 v NMFD 2' 0 0 1 -1,
'MFD 3 v NMFD 3' 0 0 0 0 1 -1,
'MFD 4 v NMFD 4' 0 0 0 0 0 0 1 -1 /adjust=bon;
run;quit;
Please edit your question and add the error message in the SAS log.
What makes you think that the "random effect didn't work"?
You might try adding HERD to the CLASS statement. If the number of herds is large, then you can use HERD in the RANDOM statement as a continuous variable, but the dataset must be sorted appropriately by herd.
That's the whole log? There are no errors. The WARNING just says that the ODS graphics will not automatically create scatter plots because the data contains more than 5000 points (the default).
You can modify the PROC MIXED statement to get the plots:
proc mixed data=have plots(maxpoints=none)=ALL;
...
Don’t miss the livestream kicking off May 7. It’s free. It’s easy. And it’s the best seat in the house.
Join us virtually with our complimentary SAS Innovate Digital Pass. Watch live or on-demand in multiple languages, with translations available to help you get the most out of every session.
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.