I need help answering a problem I have:
I am modeling data set using GLM that has two independent variables $x_1, x_2$, and a single response variable $y$. I am using $\verb|statsmodels.api|$ python library to set these models up. The problem I am trying to get an answer to is, how I get the shape parameters for the distributions that result from the model?
In other words, suppose that $\verb|glm_model|$ is the model I trained. Then given a test data point $x^*$, $$\verb|glm_model|(x^*)=y^*=\mu.$$ This is the first shape parameter for my distribution (mean). I want to get the variance, $\sigma$, so that I can get the distribution $N(\mu, \sigma)$. However, there does not seem to be any method in the glm python package that I can easily use to get this parameter.
Visually what I am trying to get is the distributions that you see on these graphs.
There is a distribution associated with each predicted value point. If there is no way to get the variance this way, is there a way to estimate the variance around $y^*$ locally? Is there a formal method of doing this?