I am estimating the effect of future expectations of profits on hospital admissions and days of hospital stays. The situation is as follows: Hospitals are paid a fixed tariff for the first x number of days of hospital stay, at x+1 days the tariff increases considerably. I am testing whether the relative increase in tariffs (or the ratio of tariff_1 and tariff_2) affects the decision whether to admit the patient today and how long the patient will be kept in the hospital.

My dataset includes number of hospital stays, tariff1 and tariff2 along with a complete set of individual health characteristics.

Due to the large number of "zero" hospital days, I would like to run a hurdle model with negative binomial distribution.

Here is a play example:

days <- c(rep(0, 30) , sample(0:100, 70, replace=TRUE))
tariff1 <- sample(1000:2000, 100, replace=TRUE) 
tariff2 <- sample(2000:4000, 100, replace=TRUE) 

dta <- data.frame(days=days, tariff1=tariff1, tariff2=tariff2)

dta$rate <- (dta$tariff2 - dta$tariff1)/dta$tariff1


model <- hurdle(days ~ tariff1 + rate , data = dta, dist = "negbin")

After this I would like to estimate what this distribution would look like if tariff1=tariff2.

# Prediction:
new <-dta
new$rate <- 0

pred_old <- predict(model,data=dta, type = "response")
pred_new <- predict(model,data=new, type = "response")
pred <-cbind(pred_old, pred_new) # the two predictions are equal

My questions are as follows:

  1. I was told that this kind of adjustment is incorrect. I would like to understand why this is.
  2. What would be a correct way to evaluate a situation of tariff1=tariff2?
  3. If correct, then why am I getting the same predictions for both?

Thank you.

  • $\begingroup$ I think you may be interested in causal modelling. Calibration is checking how close the predicted are to the observed. So if you have a scale that measures weight, you may have an item you know weights X pounds, so you weigh that item to make sure your scale is calibrated. Here you want to see how much the tariffs shifted length of stay overall. Different question. $\endgroup$
    – Andy W
    Nov 17, 2020 at 13:43
  • $\begingroup$ @AndyW: Thanks I will edit my question. $\endgroup$
    – Stata_user
    Nov 17, 2020 at 15:20

1 Answer 1


I will answer your questions in order.

1.) Disclaimer, this first question I am less certain about, but here is my best estimate:

In including both the Tariff 1 and the ratio between Tariff 1 and the change to Tariff 2, you are likely including some collinearity, considering rate includes Tariff 1 in the data. In inputting both Tariff 1 and rate into your model equation, you are examining how Tariff 1 is effecting the count of days, while controlling for the rate between Tariff 1 and Tariff 2. It may be beneficial for you to examine either Tarrif1 controlling for Tariff2 (or vice versa), or rate by itself. If you try running:

model <- hurdle(days ~ tariff1+tariff2, data = dta, dist = "negbin")

You will see that both variables will return values for estimate, standard error, z value and p-value. If you run:

model <- hurdle(days ~ tariff1 + rate , data = dta, dist = "negbin")

you will get NAs for rate value. If rate is run by itself, you will get values for all.

model <- hurdle(days ~ rate, data=dta,dist='negbin')

2.) A correct way to examine Tariff1=Tariff2 would be to create categorical variables for your observations, like so:

model <- hurdle(days ~ cat, data = dta, dist = "negbin")

3.) You are likely getting the same predictions for both because you are defining the model in your prediction calls that includes this model:

model <- hurdle(days ~ tariff1 + rate , data = dta, dist = "negbin")



is your data in that model. Redefining your data in your prediction call will not alter the model you created earlier. You should define and predict separate models like so:

model <- hurdle(days ~ tariff1 + rate , data = dta, dist = "negbin")
model2 <- hurdle(days ~ tariff1 + rate , data = new, dist = "negbin")
pred_old <- predict(model, type = "response")
pred_new <- predict(model2, type = "response")

Again, you should change your model formula to not include a tariff and rate in the same model.

  • $\begingroup$ Thanks for the response. For 1. I think you are right, I wasn't sure myself how to specify this model. However, just adding the rate and adding tariff1 and tariff2 give my very different results. I'm not quite sure which one is correct. $\endgroup$
    – Stata_user
    Nov 18, 2020 at 9:52
  • $\begingroup$ As for 2, this case doesn't exist tariff1 is never equal to tariff2, this is why I need to somehow use my estimates to calculate what this counterfactual case would look like. This is what I need help with. $\endgroup$
    – Stata_user
    Nov 18, 2020 at 9:52
  • $\begingroup$ Same for 3., I have seen people use model estimates on different datasets to estimate "counterfactual" cases (e.g. interpolation, extrapolation). I guess what I am looking for is under which conditions these hold. What are the pros/cons of doing this. $\endgroup$
    – Stata_user
    Nov 18, 2020 at 9:52
  • $\begingroup$ In any model building procedure, there is no "correct". There are bad practices, but "correct" is really determined by what your research question is. If you are concerned with the rate variable, leave only that variable in the model. If you are concerned with each individual tariff, put both of those in the model. $\endgroup$ Nov 18, 2020 at 17:06
  • $\begingroup$ If the case doesn't exist where tariff1 is equal to tariff2, you can build a model where they are both included. Then when predicting, make sure to give R hypothetical data where the actual tariff1 and tariff2 are equal, not just setting their ratio to zero. $\endgroup$ Nov 18, 2020 at 17:09

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.