I am creating a mixed model using proc mixed, and have noticed that the Fit Statistics (AIC and log likelihood) results change depending on the reference values set in the class statement. I am using version 9.4.
For example, in the Ozone dataset (attached) each subject receives one of two treatments (exposed to regular air or air with ozone added) and has an outcome (FEV1) measured at serval times (0,1,2,3,4,5, and 6). In the table, subjects are identified by the column "ID", exposure is in the "ozone_ind column", where air is 0 and ozone is 1, and time and FEV1 are in "time" and "FEV1" respectively. All measures are formatted as numbers (as opposed to characters).
When I run the following code, I get a log-likelihood of 1837.4 and AIC of 1841.4
data ozone; set ozone; t=time; run; proc mixed data=ozone method=reml; class id t ozone_ind(ref='0'); model fev1 = ozone_ind time ozone_ind*time / s ddfm=KENWARDROGER; repeated t / type=ar(1) sub=id ; run;
However, with a reference option for t, I get a log-likelihood of 1909.6 and AIC of 1913.
data ozone; set ozone; t=time; run;
proc mixed data=ozone method=reml;
class id t(ref='0') ozone_ind(ref='0');
model fev1 = ozone_ind time ozone_ind*time / s ddfm=KENWARDROGER;
repeated t / type=ar(1) sub=id ; run;
Yes, the parameterization effects the parameter estimates, and interpretation gets messy when you have an interaction term, as you do.
PROC MIXED uses a GLM parameterization. A complete explanation is in the SAS/STAT documentation in the section "GLM Parameterization of Classification Variables and Effects."
As you say, the default reference values is REF=LAST, which corresponds to '6' in your example. PROC MIXED does not support other parameterizations, so, for example, the procedure does not support the PARAM=REF option.
To use the log-likelihood to compare model fits, use the same parameterizations for all models.
It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.