[ADMB Users] glmmADMB; offset
Ben Bolker
bbolker at gmail.com
Tue Nov 9 07:42:59 PST 2010
On 11/09/2010 10:29 AM, Myles Falconer wrote:
> Hi ADMB users,
>
>
>
> I’m new to glmmADMB and R and just have a basic question...
>
>
>
> I have owl count data (y) from about 160 routes across Ontario, Canada.
> I am simply interested in looking at annual indices of owls. My data is
> overdispersed and zero-inflated, so I would like to fit it to a
> neg.binomial distribution and also use route as a random effect in the
> model. I have included an offset in the model since owl counts need to
> be adjusted according to effort (# of stations sampled)
>
>
>
> This is what I have:
>
> fit=glmm.admb(y~yr,random=~1,group="route",data=nswoc,family="nbinom",
> offset(log(stn)))
>
>
>
> My problem is that I don’t think the offset for the model is working
> properly. I get the exact same output with or without the offset
> included in the model. Am I doing this right? Anyone else have this
> problem before?
>
>
I think you need to specify the offset parameter by name:
fit=glmm.admb(y~yr,random=~1,group="route",data=nswoc,family="nbinom",offset=offset(log(stn)))
otherwise R's default behavior is to assign the next argument to the
first unspecified argument -- in this case that would be the 'link'
argument (don't know why you wouldn't be getting an error in this case,
but ...)
If that doesn't help, could you please post a reproducible example?
e.g. a small subset of your data, or a made-up example?
(you have a good name for a bird biologist!)
Ben Bolker
More information about the Users
mailing list