BookmarkSubscribeRSS Feed
lavienrose1
Calcite | Level 5

Hi,

 

I am performing univariate analyses on categorical and continuous variables such that I have hazard ratios with 95% confidence interval and p-values for the treatment and control arm.

 

When categorising my continuous variable, Hb - the output did not make sense (i.e. higher haemoglobin associated with worst survival compared to anemia). I realised that I was using PROC PHREG and by statement - so it would split the group to treatment and control then run the HR and both HR is not comparable. Looking instead to perform HR then divide into control/treatment.

 

E.g. Instead of:

proc phreg data=dataset;

model ttpfsmo*pfs(0)=Hb_ten/risklimits ties=efron;

by randtrt;

run;

 

Should I be doing:

proc phreg data=solo2_date (where = (randtrt = 0));
model ttpfsmo*pfs(0)=Hb_ten/risklimits ties=efron;
run;


proc phreg data=solo2_date (where = (randtrt = 1));
model ttpfsmo*pfs(0)=Hb_ten/risklimits ties=efron;
run;

 

What is the difference using BY and WHERE?

 

Or should I be using PROC PHREG statement but this time with contrast statement: 

proc phreg data=dataset;

      class hb_level randtrt / param = ref ref = first;

      model ttpfs*pfs(0) = hb_level|randtrt  / risklimits ties=efron;

 

      contrast '0' randtrt 1   /estimate = exp;

      contrast '1' randtrt 1 randtrt*hb_level 1 0 /estimate = exp;

run;

 

When I use the last code (output attached), with the last table - Is the estimate the hazard ratio? How do I tell what is treatment and what is control group?

 

 
 

sas-innovate-2024.png

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.

 

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
  • 0 replies
  • 1533 views
  • 0 likes
  • 1 in conversation