Reputation: 567
In my R session, I fitted a poisson regression model on patients in an emergency room like this:
fit <- glm(Patients ~ Day + Event, data = df, family = poisson)
(Day
is day of the week; Event
is "yes"/"no" whether there is a public event in town, like a concert or football match)
Now I can predict Y (the count of patients) for specific Day
and Event
like this:
predict(fit, data.frame(Day="Tu", Event="yes"), type = "response")
which gives me 12.8
. So we can expect about 13 patients on a Tuesday when there is a public event in town.
My question is: I would like to calculate the propability for Y=16 patients on a "Tuesday", based on my fitted model. How would I do that?
Upvotes: 0
Views: 40