BookmarkSubscribeRSS Feed
MrTensa
Calcite | Level 5

Hi everyone,
I need some help using proc phreg to test a population to 2 control populations for my adjusted COX model.
I have a dataset made of 3 populations, which are matched with each other using greedy matching macro.

Case=1 refers to population A, which I have matched in a ratio of 1:4 to the background population(case=0, count) and population B(case=2, count_s) in a ratio of 1:1.

The problem is that I am currently testing population A separately with the other population; so 2 populations at a time. I wanna to know how to test population A with both the background population and population B at the same time.

The code I am currently using;

 

Proc phreg data=dataset;
class case (Ref='0'); 
Model time_to_event * event_end (2)= variables variables variables variables /rl;
strata count;
run;

Proc phreg data=dataset;
class case (Ref='2'); 
Model time_to_event * event_end (2)= variables variables variables variables /rl;
strata count_s;
run;

Thanks for the help! 🙂

1 REPLY 1
SteveDenham
Jade | Level 19

See the third example in the PROC PHREG documentation - "Modeling with Categorical Predictors."  That points out the use of the CONTRAST statement to get comparisons of interest.

 

SteveDenham

sas-innovate-2026-white.png



April 27 – 30 | Gaylord Texan | Grapevine, Texas

Registration is open

Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!

Register now

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
  • 1161 views
  • 1 like
  • 2 in conversation