I have data on the duration of treatments. There is a disturbance at t=0 (treatment tariffs radically increase), which leads to an sudden increase in the number of treatments closed at that point.

I am trying to implement the methodology of a recently published paper with a similar setup. In this paper, the authors consider the situation in terms of a survival analysis and they calculate the hazard rate directly before (t=-1) of the disturbance, and directly following the disturbance (t=1). They then divide one hazard rate by the other to obtain a hazard-ratio. (See p.3250) They use a Wald-test to show that this ratio is significantly different from 1. (They present the p-values of this wald-test).

My problem is calculating this Wald-test.

In order, to calculate the Wald-test, I need the standard error of the hazard ratio. I've looked this up and all I could find was the Mantel Haenszel approach or logrank-appraoch, both of which assume proportionality in hazard-rates, which my model will not pass.

My question is how would you go about performing this Wald-test?

enter image description here


2 Answers 2


I was unable to follow the link to the paper you cite so I can't comment on that approach.

Your outcome appears to be a count ("Frequency"). I suggest a Poisson regression of Frequency on Time with a discontinuity just before 0. Something like (in R):

glm(yy ~ xx + I(xx >= 0), family = "poisson")

or perhaps

glm(yy ~ xx * I(xx >= 0), family = "poisson")

if you want the 'slope' to be different before and after the discontinuity.

Then most software will provide the Wald test for each coefficient in your model.

make up some data similar to yours


xx <- seq(-14,54)

yy <- c(1750, 1500, 1300, 1100, 900, 750, 650, 550, 500, 400, 350, 330, 260, 250, 370, 350, 300, 260, 240, 200, 175, 150, 125, 100, 75, 60, 50, 50, 50, 55, 60, 50, 40, 30, 20, round(runif(10) * 10), round(runif(24) * 6))

plot(xx, yy, type="l")

fit models

mod1 <- glm(yy ~ xx + I(xx >= 0), family = "poisson")


points(xx, predict(mod1, type="response"), col=2)

mod2 <- glm(yy ~ xx * I(xx >= 0), family = "poisson")


points(xx, predict(mod2, type="response"), col=3)


Realized that the main issue is estimating the standard error for a ratio. After some reading I also realized that the easiest way to accomplish this is bootstrapping it.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.