[ADMB Users] Poisson GLMM example
H. Skaug
hskaug at gmail.com
Thu Jun 14 15:00:51 PDT 2012
>
> 1. I expect there there is probably going to be a nugget effect in my data - Am I correct in assuming that I would be better to introduce that in the separable likelihood function as well?
Yes, you would add another random effect, call it "vi", so that your
linear predictor would look like:
dvariable eta = X(i)*_b + exp(_log_sigma)*ui + exp(new_log_sigma)*vi;
However, I am not sure if one can define a "random_effects_vector" in
addition to normal_prior M(u).
That would need to be investigated.
If it does not work, there is hope: if you replace your poisson
likelihood with a negative binomial, that will have very much the
same effect as a gaussian nugget.
> 2. As I understand it, the likelihood expression that you use in this example is not the same as that I would get from log_density_poisson() - the "-k!" component at the end is missing. Is there any reason that I can't substitute log_density_possion in there, so that I get the full likelihood and therefore can use AIC etc to compare different models?
Yes, you can switch. The example was written prior to
log_density_possion came into existence.
>
> and the big qn:
>
> 3. In "normal" linear-modelling with spatial correlation (e.g. using lme() or gls() in R), I would look for spatial patterns in the residuals, and generate a variogram to test for autocorrelation - in particular the normalized residuals returned by the R function:
> residual(lme.mdl,type="normalized")
> are supposed to be completely free of spatial-correlation (if you're doing everything correctly). However, its a bit trickier here, given that we're dealing with a GLM. The question is, in a Poisson GLMM, how do I calculate the appropriate residuals to feed into a variogram?
>
This is not ADMB specific. My rough guess for the residual in a
Poisson regression is r = (y - lambda)/sqrt(lambda) in the
language
of this example, but you should look it up.
Hans
More information about the Users
mailing list