BookmarkSubscribeRSS Feed
ZC
Calcite | Level 5 ZC
Calcite | Level 5

Hi

I am running the following PROC MIXED procedure to compare the difference in Y between group 1 and 2 to the difference in Y between group 3 and 4.

PROC MIXED;

     CLASS group;

     MODEL Y = group  X1  X2;

     CONTRAST 'Difference of differences 1 - 2 - (3 - 4)' group 1 -1 -1 1;

RUN;

The levels of another confounder (e.g., X3) in group 1 and group 3 is physiological higher than the levels in group 2 and group 4. So I cannot include X3 as an independent variable in the model since putting x3 in the model will allow X3 equal in the four groups, which is not true.

To make the comparison of differences in Y between groups (1-2) - (3-4) reasonable, I have to allow X3 comparable between group 1 and group3. So do between group 2 and group 4. How can I achieve it?

Thanks,

1 REPLY 1
SteveDenham
Jade | Level 19

I have done a lot with PROC MIXED and have never run into this situation, and don't really have good advice.  I originally thought of using the AT= option in an LSMESTIMATE statement, but could not see how to restrict the values of X3 depending on the level of group.  I am going to mention some names here, in hope that they can add something, because I truly am at a loss on this.

(whom I see has answered part of this in another thread on this forum)

Steve Denham

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 1 reply
  • 663 views
  • 0 likes
  • 2 in conversation