Help using Base SAS procedures

How to adjust for matching pair in mixed effect model?

Reply
Contributor ZC
Contributor
Posts: 21

How to adjust for matching pair in mixed effect model?


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?

Respected Advisor
Posts: 2,655

Re: How to adjust for matching pair in mixed effect model?

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

Contributor ZC
Contributor
Posts: 21

Re: How to adjust for matching pair in mixed effect model?

Posted in reply to SteveDenham

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


Respected Advisor
Posts: 2,655

Re: How to adjust for matching pair in mixed effect model?

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

Contributor ZC
Contributor
Posts: 21

Re: How to adjust for matching pair in mixed effect model?

Posted in reply to SteveDenham

Thanks. I agree with you.

Ask a Question
Discussion stats
  • 4 replies
  • 985 views
  • 1 like
  • 2 in conversation