2
$\begingroup$

We have developed a logistic regression model for predicting the attendance at an event for registrants. We can use this model to predict the probability of attendance at future events for new registrants (a new sample).

One of the things of interest is predicting the total attendance at the event which we can do by summing the predicted probabilities for the sample. We would also like to have an interval on this predicted total attendance.

Another thing we are interested in is predicting the effect of changing an inducement provided to registrants to attend the event. Doing this provides us with 2 predicted total attendances and a difference in attendance depending on the inducement provided. We would also like to calculate an interval on the difference as to whether it is statistically significant.

We are looking for advice on techniques we could apply to develop these intervals.

$\endgroup$
1

1 Answer 1

2
$\begingroup$

There are a few different ways that you could do this.

One approach would be to use the Beta-Binomial distribution (https://en.wikipedia.org/wiki/Beta-binomial_distribution) and use the predictions from your logistic regression to choose values of $\alpha$ and $\beta$ that give the predicted probability and sum to the approximate degrees of freedom for your model.

A probably simpler approach (with a fast computer) is to use simulation.
First simulate a probability from a normal (or beta may be better) with mean $\hat p$ and variance $\frac{\hat p (1-\hat p)}n$, where $n$ is the degrees of freedom from your model. Then generate a count from a binomial with the simulated $\hat p$, repeat the whole process a bunch of times, then take the middle portion of the predicted counts as your prediction interval.

If you fit the logistic regression using Bayesian methods and McMC computations, then this is even simpler as you would just generate a random count based on the predicted $\hat p$ for each iteration.

$\endgroup$
2
  • $\begingroup$ Thanks for these suggestions. For the second approach is the mean 𝑝̂ from the new predictions? Would you sample from distribution once per replication or sample for each record in the new data being predicted for each of the replications? $\endgroup$
    – Nuboso
    Commented Feb 20, 2023 at 18:27
  • $\begingroup$ @Nuboso, it appears that you have a population of interest that you are predicting for (may just be the original sample), you talked about summing the $\hat p$ values to get the predicted sum. So similarly you would generate a $\hat p$ for each individual in your population/group of interest, generate the random value based on those predictions, then sum the random values for your simulated total. Repeat the whole process a bunch of times. $\endgroup$
    – Greg Snow
    Commented Feb 21, 2023 at 17:21

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.