Programming the statistical procedures from SAS

Hazard Ratios By Hand

Regular Contributor
Posts: 239

Hazard Ratios By Hand

I am quite new to survival analysis.  I understand how to use PROC LIFETEST to get the Kaplan-Meier estimates and PROC PHREG to get a hazard ratio given a survival time, a censoring flag, and a stratifying group.  I am interested in finding a way to calculate the hazard ratio by hand.  I have been able to figure out how to get the Kaplan-Meier estimates by hand, but I cannot get the Cox porportional hazards model parameters.  As I have searched, I have found methods to get to the KM estimates, but then the papers stop and say to use a statistical package to find the parameter estimates.  Maybe what I am trying to do is too computationally intense.

My reason in doing this is because I want to be able to take a patient and change her from censored to an event (or vise versa) and see how that effects the hazard ratio and the KM curve.  I would also like to play around with changing survival times to a later or earlier time or even deleting the observation.  This purpose is mostly for my own curiousity rather than being efficient in programming.  I could simply change the observation using a DATA step and run the SAS procedures to see how things change in the end, but I would like to be able to watch the change being made so I can understand the impact of the change.

If someone has a better suggestion for doing this, I would greatly appreciate it.  Is what I am trying to do even feasible?

Ask a Question
Discussion stats
  • 0 replies
  • 1 in conversation