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


Hi,

In a dataset with repeated measurements from each subject, I matched the exposure group to those who are unexposed to a certain factor. I have the data structure as follows:

Obs  id     Y      X1      X2    matching

1      1     80    100      25       1          

2      1     70     90       20       2 

3      2     100   120     25        3

4      2     125    80      40        1

5      3     108    86      92        2

6      3     110    90      84        3

...

PROC MIXED DATA = aa METHOD = ML;

     CLASS id;

     MODEL Y = X1  X2;

     REPEATED INT / TYPE = cs SUBJECT = id;

RUN;

In a matched study, the matching pairs (i.e., variable "matching" here) should be adjusted for to obtain unbias estimates. How can I adjust for matching? Treat matching as a binary variable and put it after X2, or in the REPEATED statement or allow it a RANDOM effect?

Thanks a lot?

4 REPLIES 4
SteveDenham
Jade | Level 19

Just so I get this straight, observations with the same value of matching form the pair, correct?  I don't follow from the example data, where it looks like subject 1 is matched with subject 2 (obs 1 and 4) and subject 1 is also matched with subject 3 (obs 2 and 5).  So pairings are not exclusive per subject, which strikes me as a bit odd.  If we can get my head wrapped around the actual matching procedure, then I think the code will follow quickly, as the responses will be repeated measures on the pair.

Steve Denham

ZC
Calcite | Level 5 ZC
Calcite | Level 5

Yes. You are right. Pairs are not exclusive per subjects.


SteveDenham
Jade | Level 19

Ick.

I guess you could consider pair as a random effect, rather than repeated and try something like the following, where matching captures all of the pairs:

PROC MIXED DATA = aa METHOD = ML;

     CLASS id matching;;

     MODEL Y = X1  X2;

random matching;

     REPEATED INT / TYPE = cs SUBJECT = id;

RUN;

Steve Denham

ZC
Calcite | Level 5 ZC
Calcite | Level 5

Thanks. I agree with you.

sas-innovate-2024.png

Today is the last day to save with the early bird rate! Register today for just $695 - $100 off the standard rate.

 

Plus, pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

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
  • 4 replies
  • 3709 views
  • 1 like
  • 2 in conversation