BookmarkSubscribeRSS Feed
SarahW13
Obsidian | Level 7

Hello all! I have a question about how to do Cox regression for matched cases and controls. In my example, I have 2 controls matched to each case. I used the code from this article to generate my dataset of matched cases and controls: http://www2.sas.com/proceedings/sugi29/173-29.pdf

 

However, now I am stuck at figuring out how to actually run the analysis. I have my original dataset that has all of the covariates that I need, and I have the new dataset that has the id's of the controls, id's of the matched cases, and the variables that I used to match the cases & controls (in this case, age).

 

In my original dataset, this is what I have:

id                 age               treatment               survival             survival_censor

1                  57.1              0                            3.41                  1

2                  38.1              0                            2.05                  1

3                  42.5              0                            1.95                  0

100              57.4              1                            3.10                  1

101              57.0              1                            5.38                  0

120              38.2              1                            0.95                  0

125              38.9              1                            4.41                  0

105              43.9              1                            3.41                  0

132              41.3              1                            2.37                  0

 

Below is an example of what I have in the new dataset that has case:control matches (1:2):

 

case_id       control_id        case_age        control_age     rand_num      num

1                 100                  57.1                57.4                 0.56778         1

1                 101                  57.1                57.0                 0.56778         2

2                 120                  38.1                38.2                 0.23116         1

2                 125                  38.1                38.9                 0.23116         2

3                 105                  42.5                43.9                 0.95096         1

3                 132                  42.5                41.3                 0.95096         2

 

I would like to run a Cox regression comparing the survival between the matched cases and controls, but I have the actual case-control pairings in one dataset and the survival info (plus other covariates that I need to adjust for) in a separate dataset.

 

Does anyone have any advice on the next steps I need to do?

Thanks!

 

1 REPLY 1
SarahW13
Obsidian | Level 7

I thought I would check again to see if anyone has thoughts on this. Would cox regression even be appropriate in this case, or would I need other methods (eg, conditional logistic regression) to compare survival between the matched cases and controls? Any guidance would be much appreciated.

SAS Innovate 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

What is ANOVA?

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.

Discussion stats
  • 1 reply
  • 1421 views
  • 0 likes
  • 1 in conversation