question: Should the null model for llnull in count models also include exposure?
It doesn't currently
model = self.model
#TODO: what parameters to pass to fit?
null = model.__class__(model.endog, np.ones(self.nobs)).fit(disp=0)
I'm trying to write the equivalent Wald test.
Looks like a bug.
From running an example, Stata looks like is using exposure in the ll-null, while in statsmodels ll-null is unchanged when we add exposure
Intuitively, I'd say yes, this is a bug.
If you have a test handy that would be helpful.
I will have a test case later in my next robust cov PR. plus the Wald test addition #1104
right now I'm using the ships data from xtpoisson
"We have data on the number of ship accidents for five different types of ships (McCullagh and Nelder 1989, 205)."
If we want to fix it fast, for 0.5.1, then we could maybe reuse a current test case.
Problem with exposure: we don't store "exposure" we store log(exposure)
TST: add failing test, bug #1221
REF/ENH: add `_init_keys` to recreate model closes #1221 closes #1609