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?