The two statements
random subject(sequence);
and
random int / subject=subject(sequence);
are equivalent in terms of the model they fit. You will get the same results with either syntax, modelling a common covariance to all the observations from the same level of SUBJECT(SEQUENCE).
The second RANDOM statement is more efficient, however. That statement allows you to process your data by subjects, rather than processing the entire V matrix for the data all at once. If you check the DIMENSIONS table near the top of the PROC MIXED output, you will see an entry for number of subjects. For the first RANDOM statement above, you will see a 1 for the number of subjects since the SUBJECT= option was not used. That 1 indicates that MIXED is processing the entire V matrix at once. The entry for the number of subjects in the DIMENSIONS table for the second RANDOM statement will be equal to the number of unique values of SUBJECT(SEQUENCE) in your data.
Processing the data by subjects will save you memory and will save you execution time. With a small data set, the savings may be minimal. It may take a larger data set and model to see measurable savings.
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
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.