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?
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
Yes. You are right. Pairs are not exclusive per subjects.
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
Thanks. I agree with you.
Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.
Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.
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.