BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
bentleyousley
Calcite | Level 5

       

I'm trying to derive the Stratified unadjusted Cox model Hazard ratio and confidence intervals. The specs are such:

 

Hazard ratio as a treatment effect measure will be derived from the
Cox proportional hazards model using SAS procedure PHREG.
The stratified unadjusted Cox model will be used (where the baseline
hazard function is allowed to vary across strata) for the primary
analysis, i.e. the MODEL statement will include the treatment group
variable as the only covariate and the STRATA statement will include
stratification variables.
PROC PHREG data=dataset;
MODEL survtime*censor(1)=trt / TIES=EXACT;
STRATA stratum1 .. <stratum k>;
RUN;
/* survtime represents variable containing event/censor times;
   censor represents censoring variable (1=censored, 0=event);
   trt represents treatment group variable;
   stratum1 to stratumk represent stratification variables */
Hazard ratio with two-sided 95% confidence interval will be based on Wald test.

 

 

 

I need to capture the ods output for hazard ratio and confidence intervals into a dataset for reporting. This is the current code:

 

 

        ODS TRACE ON;
        ODS OUTPUT ;

        proc phreg data = pop3;
        model months*event(0) = TRT01PN  TIES=EXACT;
        STRATA STRVAL1 STRVAL2 STRVAL3 ;
        run;

        ODS OUTPUT CLOSE;
        ODS TRACE OFF;

 

 

Which ODS output dataset(s) need to be captured and do the values require extra code to derive?

 

Thank you!

1 ACCEPTED SOLUTION

Accepted Solutions
ndp
Quartz | Level 8 ndp
Quartz | Level 8

ODS OUTPUT PHREG.PARAMETERESTIMATES=HR;

View solution in original post

1 REPLY 1
ndp
Quartz | Level 8 ndp
Quartz | Level 8

ODS OUTPUT PHREG.PARAMETERESTIMATES=HR;

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
  • 1 reply
  • 3358 views
  • 0 likes
  • 2 in conversation