[ADMB Users] glmmADMB in R:question regarding 'residuals(Model)'
hskaug at gmail.com
Mon Jan 10 16:40:33 PST 2011
I think residuals(best) returns
[A1$NO -(fitted(best)] / SD
where SD is the standard deviation, which depends on the distribution
at hand. The code
inside glmm.admb that determines SD is:
tmpsd <- switch(family, poisson = sqrt(lambda), nbinom = sqrt(lambda *
(1 + lambda/out$alpha)), binomial = sqrt(out$fitted *
(1 - out$fitted)))
On Fri, Jan 7, 2011 at 1:01 AM, Schweizer, Peter E.
<schweizerpe at ornl.gov> wrote:
> Dear colleagues,
> We are using glmmADMB in R to model land cover and water quality influence
> on species diversity of fishes within a study area with several subregions.
> We defined subregion as a random factor and also ask for individual
> intercepts for the different subregions.
> A ‘global’ model for overdispersed count data was formulated as
> GM<-glmm.admb( N_Species ~ b1 + b2 + b3 + …+ bn + Subregion, random = ~ 1,
> group="Subregion", data=input, family="nbinom")
> We subsequently evaluated several candidate models that represent various
> subsets of variables from the global model.
> Our input file is A1, with A1$NO representing the observed number of
> species. During the process of examining model performance we used
> Observed – Predicted (A1$NO -(fitted(best))) for the ‘best’ model based
> on lowest AICc to derive residuals for predicted Nspecies. However, using
> ‘residuals(best)’ produced considerable different (smaller) values which we
> find somehow puzzling. Are we wrong to assume that (Nspecies predicted by
> ‘best’ model, + residuals(best)) should add up to Nspecies observed
> Any insight would be appreciated.
> Users mailing list
> Users at admb-project.org
More information about the Users