The only thing I would add here is to first investigate whether the slope is not significantly different for the two postures. Start with this code:
proc mixed data=Have;
class Subject Position(ref='Sitting');
model Valve2 = Valve1 Position Valve1*Position/ s chisq outpred=MixedOut;
random intercept / subject=Subject; /* each subject gets its own intercept */
run;
If Valve1*Position is not significant, you can assume that the slopes aren't different for the two Positions. If it is significant, then consider this model:
proc mixed data=Have;
class Subject Position(ref='Sitting');
model Valve2 = Valve1 Valve1*Position / s chisq outpred=MixedOut;
random intercept / subject=Subject; /* each subject gets its own intercept */
run;
Under this model, if you are interested in LSmeans (which I doubt, as this looks like a pure regression problem), you should do the comparisons at 3 values for Valve1 (high, mean, low). See the chapter on analysis of covariance in SAS for Mixed Models (any edition).
An alternative way of thinking about this is as a bivariate correlation within posture. SGPLOT would enable plotting confidence ellipses that provide an excellent graphical presentation.
SteveDenham
Hi Rick,
If you have some free time I'll appreciate your help with a follow up question to this analysis. Let's say if I were to add in age and gender to this data and control for them, would I be able to include it in the mixed model somehow?
Thanks!!
Add Gender to the CLASS statement and add Gender and Age to the MODEL statement.
Available on demand!
Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.
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.