Simple Hazard Ratios HR in ods dataset
Mon May 29 2023 21:53:48 GMT+0000 (Coordinated Universal Time)
Saved by
@ddover
ods output ParameterEstimates=HR;
Proc PHReg Data=analysis;
Model diag_time*diag(0) = X / risklimits=wald; *risklimits adds CI to ods ds*;
run;
*fill in HR if missing*; *usually if there are interactions*;
Data HR;
Set HR;
if missing(HazardRatio) and not missing(Estimate) then do;
HazardRatio = exp(estimate);
HRLowerCL = exp(estimate - 1.96*stderr);
HRUpperCL = exp(estimate + 1.96*stderr);
end;
run;
content_copyCOPY
Comments