Hi,
Background:
Consider a simple ANOVA model to test for differences between treatments on some continuous PD-outcome variable. For this simple example, Levene's test can be applied to test homoscedasticity between treatments on the residual term. Using proc mixed, it is not possible to get Levene's test automatically from the model, but extracting the absolute values of the studentized residuals and then running the model again with the absolute residuals as the dependent variable, e.g. like this:
proc mixed data=residuals;
class treatment;
model abs_resid = treatment;
run;
and then looking at the p-value for the F-statistics would be the equivalent for Levene's test.
Current case:
However, I have a more complicated linnear mixed model, LMM, with treatment as a categorical explanatory variable, a continuous covariate (the baseline measurements) and subject within treatment (parallel study). Also, measurements are taken at two post-baseline timepoints, so there is a repeated measurements situation. I use all post-baseline measurements and include the (post-baseline) timepoint and the interaction treatment*timepoint as categorical effects in the model. This is this model definition:
proc mixed data=example_data;
class subject treatment timepoint;
model change_from_baseline = treatment|timepoint baseline / ddfm=kenwardroger2 outp=residuals RESIDUAL;
repeated timepoint / subject=subject (treatment );
run;
Questions:
Given my more complicated model, compared to the ANOVA situation:
Many thank for any useful input in this situation!
Kind Regards,
Joakim
The GLIMMIX procedure has a specific COVTEST for homogeneity of variance components. Check the documentation for specifics on how to implement this, as it requires a group= option in the RANDOM statement.
Note that the test is a log likelihood ratio test, which in a fully fixed effect model is not as powerful as Levene's test. But since GLIMMIX allows you to easily fit a heterogeneous variance situation, it's not an issue (at least in my field).
I also caution you about fitting a change from baseline response with baseline as a covariate. The model is algebraically identical to fitting the response with baseline as a covariate save that the coefficient for the covariate in the change from baseline is equal to the coefficient minus one for the straight response variable.
SteveDenham
Many thanks Steve. Yes, I will look into proc glimmix. Seems to be more versatile than proc mixed in many respects.
Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.
Register today!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.