I have daily data on surgery cancellations for about six months and would like to examine the bivariate associations of several factors and surgery cancellations.

Each day there are variable number of total surgeries scheduled (canceled + completed) - median 20 (IQR: 18, 22.5; range 0 to 36).

date total_surgeries surgeries_cancelled factor1
23-Jun-22 20 4 NA
24-Jun-22 14 1 NA
27-Jun-22 19 7 151
28-Jun-22 17 4 132
29-Jun-22 21 9 NA
30-Jun-22 19 5 115
1-Jul-22 19 4 117
4-Jul-22 24 7 142
5-Jul-22 18 8 135
7-Jul-22 18 6 156
8-Jul-22 14 3 131
... ... ... ...

My approach is to use Poisson regression (assuming no overdispersion) on these count data and control for the total number of surgeries in the model in an offset - i.e., in R my model would look like this to examine the association between a theoretical factor1:

glm(surgeries_cancelled ~ factor1 + offset(log(total_surgeries)), 
    data = surgery_data, family = poisson(link = "log"))

In the past to model rates my numerators/denominators have been much larger - i.e. hundreds of cases of an infectious diseases out of populations of tens of thousands. I want to make sure this are no statistical caveat for such relatively small counts/denominators, or is there a better approach to examine the associations of these data?

I am working in R, so an R reproducible R example is below if needed:

surgery_data <- structure(list(date = c("23-Jun-22", "24-Jun-22", "27-Jun-22", 
"28-Jun-22", "29-Jun-22", "30-Jun-22", "1-Jul-22", "4-Jul-22", 
"5-Jul-22", "7-Jul-22", "8-Jul-22", "11-Jul-22", "12-Jul-22", 
"13-Jul-22", "14-Jul-22", "15-Jul-22", "18-Jul-22", "19-Jul-22", 
"20-Jul-22", "21-Jul-22"), total_surgeries = c(20L, 14L, 19L, 
17L, 21L, 19L, 19L, 24L, 18L, 18L, 14L, 26L, 20L, 24L, 18L, 18L, 
26L, 17L, 22L, 21L), surgeries_cancelled = c(4L, 1L, 7L, 4L, 
9L, 5L, 4L, 7L, 8L, 6L, 3L, 5L, 10L, 6L, 4L, 6L, 6L, 5L, 7L, 
7L), factor1 = c(NA, NA, 151L, 132L, NA, 115L, 117L, 142L, 135L, 
156L, 131L, 143L, 112L, 144L, 152L, 144L, 156L, 133L, 153L, 144L
)), row.names = c(NA, 20L), class = "data.frame")

glm(surgeries_cancelled ~ factor1 + offset(log(total_surgeries)),
    data = surgery_data, family = poisson(link = "log"))
  • 1
    $\begingroup$ Binomial regression could be an alternative; in that case, you do not need an offset. $\endgroup$
    – utobi
    Commented Jul 9, 2023 at 13:35

1 Answer 1


First of all, a binomial GLM is more appropriate than a Poisson GLM. (A Poisson GLM is used for unbounded counts; your counts are bounded by the total number of surgeries.) The counts aren't that small and shouldn't pose an obstacle to valid inference.

Second, can surgery cancellations be treated as independent? Technically, you have time series data. I'm worried about possible unmeasured factors that affect the probability of cancellation and vary with time.

  • 2
    $\begingroup$ Thank you, this was the exact type of advice I was looking for. Since I usually work with count that are functionally unbounded I overlooked this consideration. In the full data I tested for any, monotonic, and linear trends, all of which indicated there were no trends in the data. Would this address your second concern? $\endgroup$
    – jpsmith
    Commented Jul 9, 2023 at 21:03
  • 5
    $\begingroup$ Not exactly. The assumption of independence is hard to verify. I suppose you could plot the standardized residuals (based on the binomial GLM) vs. time. If the total numbers of surgeries were large, they would be approximately iid as N(0,1) if the model is correct. Given that they are only modest, I'm guessing that they won't be particularly informative. But check for suggestions of autocorrelation (e.g., cycles). $\endgroup$ Commented Jul 9, 2023 at 21:42

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.