This is my first go round with glm. I'm fitting a model with meglm using the gaussian family and log link. I had previously fitted this model with xtreg and a logged dependent variable (badly skewed and overdispersed, logging greatly improved model fit).
Now I understand that I am now logging the expected mean where as before I was modeling the mean of the logged observed values so the models are not exactly equivalent. However, I'm not sure how to interpret the resulting glm coefficients. Given a linear model with a logged outcome I would exponentiate the coefficient and interpret that as the percent change (i.e. 1.15 would be a 15% increase in Y resulting from a 1 unit increase in X). How do I interpret the coefficients, and, especially, how would I interpret the average marginal effects from the glm model? I also have two predictors that have been logged which, in the regular old linear model would have been elasticities but now I'm not sure what they are.
This is stata 14. I've moved to meglm over xtreg and xtmixed because I intend to use the margins command and margins will integrate the random intercepts with the meglm command (xtmixed or xtreg will not do this).
command as follows:
meglm y x1 x2 ln(x3)... xn || clustervar: , family(gaussian) link(log)
I'm also getting the error that "numerical derivatives are approximate
nearby values are missing"
Whereas the exact same command produced no error with xtreg. This would seem to indicate convergence problems, maybe collinearity is an issue?
I assume I should plot predicted values vs. standardized residuals to check for model fit - run it with the identity link and the log link and see which looks better, correct? What about a gamma family? The outcome is not count data but it is all positive and greater than zero.
Your advice is greatly appreciated.
Now I understand that I am now logging the expected mean where as before I was modeling the mean of the logged observed values so the models are not exactly equivalent. However, I'm not sure how to interpret the resulting glm coefficients. Given a linear model with a logged outcome I would exponentiate the coefficient and interpret that as the percent change (i.e. 1.15 would be a 15% increase in Y resulting from a 1 unit increase in X). How do I interpret the coefficients, and, especially, how would I interpret the average marginal effects from the glm model? I also have two predictors that have been logged which, in the regular old linear model would have been elasticities but now I'm not sure what they are.
This is stata 14. I've moved to meglm over xtreg and xtmixed because I intend to use the margins command and margins will integrate the random intercepts with the meglm command (xtmixed or xtreg will not do this).
command as follows:
meglm y x1 x2 ln(x3)... xn || clustervar: , family(gaussian) link(log)
I'm also getting the error that "numerical derivatives are approximate
nearby values are missing"
Whereas the exact same command produced no error with xtreg. This would seem to indicate convergence problems, maybe collinearity is an issue?
I assume I should plot predicted values vs. standardized residuals to check for model fit - run it with the identity link and the log link and see which looks better, correct? What about a gamma family? The outcome is not count data but it is all positive and greater than zero.
Your advice is greatly appreciated.
Comment