Calculating Hazard Ratios

MrT

New Member
#1
Hi there,

I would like to calculate the hazard ratio (or deviation from the mean) for an 'event'

My data has the dates of 'events' and I would like to see if the risk of a subsequent 'event' increases or decreases (over the next say 50 days) following an 'event' of the same type.

In other words, does the occurrence of such an event make another event (of the same type) more or less likely on day 1, 2, 3, 4, 5, 6, 7.... 50.

Ideally I would love to plot these results in a graph. With days elapsed on the x axis and hazard ratio on the y axis. My hypothesis is that risk will be increased immediately following an event (i.e. a ratio of >1), but slowly decay in time to baseline levels. For example within 20 days.

Unfortunately I am hopeless with stats and have no idea where to even start.

Is there a quick way of doing this either with Excel or SPSS?

If anymore information is needed, or if i haven't been clear enough, please ask.

Thanks so much.
 

BGM

TS Contributor
#2
Depending on your assumptions and the nature of the data, you may have Kaplan-Meier type non-parametric estimator for the survival function and thus the hazard ratio.
 

MrT

New Member
#3
Hi BGM,

Thanks for the reply.

The data is laid out like this

01/01/2000 1
04/01/2000 1
10/01/2000 1
13/01/2000 1
14/01/2000 1

Dates and the presence of "1" indicating an event (if necessary). I want the hazard ratio for the risk of a subsequent event within 1, 2, 3, 4 days... and so on following an event.

I am confident that the ratio will be high in the short term, but then decay in time. But I would like to produce a graph similar to the one below. Hazard ratio vs. time elapsed.



Any walk-through for achieving this?
 

hlsmith

Omega Contributor
#4
Clarification, everyone in your sample had an event, now you are just seeing who subsequently has the event again? Or are you seeing who has two events and some people may end up having "0" events?

It does seem like proportional hazards regression (Cox's regression).
 

MrT

New Member
#5
Hi,

My data refers to attacks in a country within a 5 year period.

Each date represents an attack. Or an 'event'

So the country is being repeatedly attacked. But the risk of an attack is highest when an attack happened recently. The risk decays in time to that after (say 50) days the risk is back to normal.

This is because attacks cluster in time.