+ Reply to Thread
Results 1 to 5 of 5

Thread: Calculating Hazard Ratios

  1. #1
    Points: 36, Level: 1
    Level completed: 72%, Points required for next Level: 14

    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Calculating Hazard Ratios




    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.

  2. #2
    TS Contributor
    Points: 22,410, Level: 93
    Level completed: 6%, Points required for next Level: 940

    Posts
    3,020
    Thanks
    12
    Thanked 565 Times in 537 Posts

    Re: Calculating Hazard Ratios

    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.

  3. #3
    Points: 36, Level: 1
    Level completed: 72%, Points required for next Level: 14

    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Calculating Hazard Ratios

    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?

  4. #4
    Omega Contributor
    Points: 38,396, Level: 100
    Level completed: 0%, Points required for next Level: 0
    hlsmith's Avatar
    Location
    Not Ames, IA
    Posts
    7,001
    Thanks
    398
    Thanked 1,186 Times in 1,147 Posts

    Re: Calculating Hazard Ratios

    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).
    Stop cowardice, ban guns!

  5. #5
    Points: 36, Level: 1
    Level completed: 72%, Points required for next Level: 14

    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Calculating Hazard Ratios


    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.

+ Reply to Thread

           




Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts






Advertise on Talk Stats