negBinMod: negBinMod

Description Usage Arguments Details Value Authors Examples

Description

negBinMod fits a negative bionomial model to data. Use to fit Total Abundance (Ni)

Usage

1
negBinMod(NB.form, data, est.var=TRUE, scale.covar=FALSE , trace=TRUE)

Arguments

NB.form

an object of class "formula" (or one that can be coerced to that class):a symbolic description of the model to be fitted. An offset in the form offset(log(area sampled)) should be included in the model formula to adjust for differences in area sampled between sites.

data

a data frame containing the all variables in the formula including the offset and the response. Each row should be a different site.

scale.covar

Should the model matrix be scaled (TRUE/FALSE)? Useful if models do not converge. Setting this to TRUE will save the column means and sd for later prediction.

est.var

estimate the variance-covariance matrix using newton-raphson

trace

print model trace

Details

negBinMod used glm.nb (MASS) to get initial parameters & then uses nlminb to fit model. Allows calculation of se for overdispersion parameter. Output is otherwise identical to glm.nb

Value

coef

coefficents

vcov

variance-covariance matrix

logl

log-likelihood

AIC

AIC

residuals

model residuals, calculated using PIT

fitted

fitted values

mean.X

column means for model matrix if scale.covar is TRUE

sd.X

column sds for model matrix if scale.covar is TRUE

formula

model formula

Authors

Piers Dunstan and Scott Foster

Examples

1
2
3
4
N.form <- N~1  + depth + O2_AV + temp_AV + offset(log(area))
model.N <- negBinMod(N.form,data=fish.data,est.var=TRUE,scale.covar =FALSE)
plot(model.N$fitted,model.N$residuals)
abline(h=0)

RAD documentation built on May 2, 2019, 9:36 a.m.

Related to negBinMod in RAD...