I am writing for your input on how best to use exposure () in xtgee and glm analyses.
My outcome variable is count data. However, my unit of analyses is neighborhood and since each neighborhood varies by size it’s best to use the density variable of the count / area of neighborhood.
My question: is it better to capture the differences in neighborhood area by using the exposure option and if so, should I do this in addition to or in lieu of making the outcome the density variable.
Example 1: xtgee
xtset neighborhood year
xtgee count predictors, family(Gaussian) identity(link) corr(ar1) exposure(area of neighborhood) vce
Or
xtgee density predictors, family(Gaussian) identity(link) corr(ar1) exposure(area of neighborhood) vce
Example 2: GLM
glm count predictors, family(gamma) identity(link) corr(ar1) exposure(area of neighborhood) vce
Or
glm density predictors, family(gamma) identity(link) corr(ar1) exposure(area of neighborhood) vce
I’m leaning towards using xtgee density with exposure and glm with count but unclear how to account for the differences in area when using glm. Could i still use glm gamma distribution if I’m using density?
Thank you in advance for your insights.
Related Posts with Questions about using exposure() with xtgee and glm when outcome can be count or density.
Decomposition modelPlease, I need help with the syntax for decomposition analysis. I am trying to get a syntax to get a…
marginsplot with a constant (downward shift)Dear all, I am using the marginsplot command to create a graph which includes a confidence interval…
Help creating a variable concerning spellsHi, sorry for another post. I need help creating variable W1 (shown below). The idea is, for each c…
Convergence Not Achieved: after Running p-varHello guys, I am new to STATA. Now I am having problem. After running pvar, there are results, but…
Collinearity problem in Difference in difference estimation with leads // Stata/IC 15.0Dear Statalist users, I am Gabriele Dini, I study Economics at the University of Bologna and I'm d…
Subscribe to:
Post Comments (Atom)
0 Response to Questions about using exposure() with xtgee and glm when outcome can be count or density.
Post a Comment