You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
FAQ cov_type HC with Poisson and exposure and weights #2831
edit this agrees with Stata
I had already the Stata results included, just hadn't used it for a test.
bse agrees with Stata in the test case at rtol=1e-12, except for the nobs / (nobs - 1) factor.
I don't understand the results
see first comment (which I will remove later)
cov_type=HC has standard errors that are 10 times larger than nonrobust
GLM Poisson and discrete Poisson produce the same results
I started to write this as a FAQ, having partially convinced myself that it's a "feature".
But this looks toooo suspicious. Looking more carefully, the unit tests only cover the cluster robust case with exposure. HC is not tested with exposure, but on the other hand it shouldn't have any code that is specific to this case.
somewhere something is weird, or I'm not thinking in the right way.
FAQ: cov for Poisson with exposure versus frequency weights
Why are the nonrobust standard errors the same in Poisson with exposure and Poisson with frequency weights, but they are different in the two models for heteroscedasticity robust standard errors?
Poisson with exposure with HC1 are unit tested against Stata.
GLM Poisson doesn't have unit tests for exposure when cov_type="HC1", but they agree in the example with discrete Poisson. So, bug is unlikely.
maybe an answer, maybe not:
Poisson is additive, but that requires correct specification assumption.
If we use exposure to combine several cases (person-years), then this assumes correctly specified aggregation for these cases. HC robustness is only across "observations"
...
I read an article recently (most likely Cameron and a co-author) that has estimation based on aggregated and based on individual data in an example. The robust standard errors in the aggregated model are also about 10 times the ones of the disaggregated model.
Activity
josef-pkt commentedon Feb 19, 2016
I started to write this as a FAQ, having partially convinced myself that it's a "feature".
But this looks toooo suspicious. Looking more carefully, the unit tests only cover the cluster robust case with exposure. HC is not tested with exposure, but on the other hand it shouldn't have any code that is specific to this case.
somewhere something is weird, or I'm not thinking in the right way.
FAQ: cov for Poisson with exposure versus frequency weights
Why are the nonrobust standard errors the same in Poisson with exposure and Poisson with frequency weights, but they are different in the two models for heteroscedasticity robust standard errors?
???
side question based on #2829
Poisson with exposure with HC1 are unit tested against Stata.
GLM Poisson doesn't have unit tests for exposure when
cov_type="HC1", but they agree in the example with discrete Poisson. So, bug is unlikely.maybe an answer, maybe not:
Poisson is additive, but that requires correct specification assumption.
If we use exposure to combine several cases (person-years), then this assumes correctly specified aggregation for these cases. HC robustness is only across "observations"
...
josef-pkt commentedon Feb 20, 2016
finally some internet search: "aggregating quasi poisson"
glen_b's answer in
http://stats.stackexchange.com/questions/181517/scaling-vs-offsetting-in-quasi-poisson-glm
provides some cases where scaling changes the variance.
However, I use HC standard errors, so the aggregation effect has to be in the "quasi" part
[-]BUG maybe: cov_type HC with Poisson and exposure[/-][+]FAQ cov_type HC with Poisson and exposure and weights[/+]josef-pkt commentedon Apr 28, 2016
(too late for proper reference)
I read an article recently (most likely Cameron and a co-author) that has estimation based on aggregated and based on individual data in an example. The robust standard errors in the aggregated model are also about 10 times the ones of the disaggregated model.