0

I am trying to wrap my head around this:

  • Other than a standard linear regression model, we almost never know the theoretical distributions of the error terms
  • Thus, how do we simulate random errors from these models? How do we know if the model fits the data well (apart from the deviance residual)?

For example, here is a poisson regression:

$$\text{E}(y|X) = e^{b_0 + b_1 x_1 + \ldots + b_k x_k}$$ $$ y \sim \text{Poisson}(\lambda)$$ $$ \lambda = e^{b_0 + b_1 x_1 + \ldots + b_k x_k}$$

As we can see in the above case, there is no distribution for the error terms.

Suppose I have some data and fit a poisson regression model. I want to simulate error at a specific value of $X =x_i$.

Thinking out loud, I could calculate the value of $\lambda$ (third equation) and then simulate multiple values of $y$.

But in this case, how would I compare the theoretical distribution of the errors to the actual distribution of errors? How would I know the model fits well (apart from the chi-square distribution of the deviance residual)?

Can someone help me understand how this would be done?

  • Isn't this just a version of the previous three questions you have posted? – whuber Feb 29 '24 at 16:43
  • Durden: but isnt a posterior predictive distribution for a bayesian model? the one I posted here is non-bayesian – Uk rain troll Feb 29 '24 at 17:12
  • I have voted to close this as a duplicate of a question I have found useful many times. The question handles logistic regression, but the idea is exactly the same for a Poisson regression. If the analogous steps to adapt that for Poisson regression is not clear, please do ask for clarification. The key point there, though, is that there isn’t an error distribution the same way as in a standard linear model, $X\beta+\varepsilon.$ – Dave Feb 29 '24 at 17:18
  • It wasn't clear from your question whether you wanted a Bayesian or frequentist answer. In any case, the simulation of $y$ conditional on $X = x_i$ and your point estimate for the regression parameters is essentially a special case of a posterior predictive; you're simply ignoring the uncertainty in the parameter estimates. – Durden Feb 29 '24 at 20:46

0 Answers0