Hi all,
I have constructed a GLM using logistic regression. For any given observation, I am able to obtain predictions and confidence intervals around the individual predictions. I now want to aggregated my data in a variety of ways, i.e. sum up my predictions by common characteristics, for example animal species (given that the data includes information on a variety of zoo animals). I believe that the mean predictions can be aggregated by a simple sum, but I suspect that, to obtain an aggregated confidence interval, I cannot just add up each observation's upper and lower confidence interval bounds, correct?
If I am correct, does anyone know how I would go about constructing confidence intervals around aggregated (summed) predictions from a logistic regression model?
I have found some related threads on stack overflow (see here: https://stackoverflow.com/questions/39337862/linear-model-with-lm-how-to-get-prediction-variance-of-...), but am unsure if this approach still is appropriate when extended from OLS to GLM. My first guess would be to try the outlined approach before applying the link function, then to transform the mean, upper and lower bounds of the CI using the appropriate inverse link, but I really am not sure. Any help is appreciated. Thank you!