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!
ODS OUTPUT PHREG.PARAMETERESTIMATES=HR;
ODS OUTPUT PHREG.PARAMETERESTIMATES=HR;
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
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.