nmix: nmix

View source: R/nmix.R

nmixR Documentation

nmix

Description

nmix fits the N-mixture model of Royle et al (2004)

Usage

nmix(lamformula, detformula, data, K, mixture=c("P", "NB"),
starts, method="BFGS", se=TRUE, ...)

Arguments

lamformula

formula for the latent abundance component.

detformula

formula for the detection component. Only site-level covariates are allowed for the detection component. This differs from the similar model in unmarked.

data

A eFrame object containing the response (counts) and site-level covariates. see eFrame for how to format the required data.

K

Integer upper index of integration for abundance. This should be set high enough so that it does not affect the parameter estimates. Note that computation time will increase with K

mixture

Distribution model for the latent abundance, either Poisson (P) or Negative-binomial (NB).

starts

Initial values for parameters

method

Optimisation method

se

flag to return the standard error (hessian).

Value

a efit model object.

Examples

 counts<- san_nic_pre$counts
 emf <- eFrame(y=counts)
 mod <- nmix(~1, ~1, data=emf)
 Nhat<- calcN(mod)


dslramsey/eradicate documentation built on March 16, 2024, 1:40 p.m.