siteocc: Fitting Patch Occupancy Models

Description Usage Arguments Details Value Warning Note Author(s) References See Also Examples

Description

siteocc will fit a patch occupancy model to histories of observations and can account for an imperfect probability of detection.

Usage

1
siteocc(psi, p, histories, start=NULL, lower=NULL, ...)

Arguments

psi

an object of class formula (or one that can be coerced to that class): model formula for the site occupancy parameters. Each covariate called should be a vector of size nsites x 1.

p

an object of class formula (or one that can be coerced to that class): model formula for probability of detection given presence parameters. Each covariate called should be a matrix of size nsites x nvisits. To fit a beta-binomial mixture to probability of detection, specify "~ Beta.mixture" (case-sensitive) as the model for p. This argument specification assumes p's come from a beta-binomial mixture.

histories

matrix of encounter histories. One row per site, one column per visit. This argument should be of size nsites x nvisits. A NA may be used in the histories dataframe to represent instances when a survey could not be completed at a particular site for a particular visit.

start

vector of starting values passed to the nlminb function. If start=NULL, then the default starting values will be used. See details.

lower

vector of lower bounds passed to the nlminb function. If lower=NULL, then the default lower bounds will be used. See details.

...

other arguments passed to the nlminb function. See ?nlminb.

Details

The log-likelihood is maximized using the nlminb function. If the user decides to provide starting values, then they will need to specify values for each PSI covariate as well as each P covariate, including intercepts. The starting values should be listed in the order of the specified covariates (i.e., the PSI intercept starting value first, the PSI coefficient(s) starting value(s) next, then the P intercept starting value, and finally the P Coefficient(s) starting value(s)). See below for an example of format. If specifying a Beta-mixture model, then the starting values are 0.5 for all of the covariates including the intercept. Otherwise, 0 is used for the starting value of each covariate.

The same format used to specify starting values should also be used to specify the lower bounds for the lower argument. The default lower bounds for a Beta-mixture are -Inf for all PSI covariates and 0 for both of the beta-binomial parameters. If you specify a lower bound of less than 0 for the beta-binomial parameters, your model will most likely not converge. This is because both parameters must be strictly greater than 0. If a Beta-mixture is not specified, then -Inf will be the lower bound for all covariates.

Unless otherwise specified, the default values of the nlminb function are used.

The example datasets are detailed in pages 116-122 of MacKenzie et al. (2006) and also included with the program PRESENCE.

Value

loglik

Optimized log-likelihood.

convergence

An integer code. 0 indicates successful convergence. See the Value section of ?nlminb.

convergence.message

A character string giving any additional information returned by the optimizer, or NULL. See the Value section of ?nlminb.

call

The matched call.

naive.psi.est

Naive Estimate of Occupancy.

nsites

Number of Sites.

nvisits

Number of Visits.

psi.coefs

Esimate(s) of psi coefficient(s).

p.coefs

Estimate(s) of p coefficient(s) or the shape parameters if a Beta-Binomial mixture model was specified.

se.psi.coefs

Standard Error of the psi coefficient(s).

se.p.coefs

Standard Error of the p coefficient(s).

hessian

Hessian matrix used to compute the standard error of the psi and p coefficient(s).

psi.ests

Psi Estimates corresponding to each site.

p.ests

Matrix of P Estimates corresponding to each site and visit.

aic

Akaike's information criterion.

bic

Bayesian information criterion.

Warning

Be sure to check for convergence. Some tips if you are having trouble getting your models to converge:
1. Choose different starting values.
2. Make sure your covariates are on similar scales.
3. Check for high correlations among covariates.

Note

Currently, this function does not fit visit-specific P-covariates.

Author(s)

Fawn Hornsby, Ryan Nielson, and Trent McDonald www.west-inc.com

Maintainer: Fawn Hornsby fhornsby@west-inc.com

References

Royle, J.A., 2006. Site occupancy models with heterogeneous detection probabilities. Biometrics 62:97-102.

MacKenzie, D.I., Nichols, J.D., Lachman, G. B., Droege, S., Royle, J. A., and Langtimm, C. A., 2002. Estimating site occupancy rates when detection probabilities are less than one. Ecology, 83:2248-2255.

MacKenzie, D.I., Nichols, J.D., Royle, J.A., and Pollock, K.H. (2006), Occupancy Estimation and Modeling: Inferring Patterns and Dynamics of Species Occurrence, Academic Press, Burlington, MA.

See Also

weta.data
print.pom
print.mixed.pom
F.2nd.deriv

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
data(weta.data)

# INTERCEPT-ONLY MODEL
fit1 <- siteocc(~1, ~1, histories=weta.data$detection.histories, start=c(1,1))

# BETA-BINOMIAL MIXTURE MODEL
fit2 <- siteocc(~1, ~Beta.mixture, histories=weta.data$detection.histories, 
	lower=c(log(0.01),0.0001,0.0001))

# MODEL TESTING BROWSED AND OBSERVER EFFECTS
fit3 <- siteocc(~weta.data$siteCovar$Browsed, ~weta.data$Obs1 + weta.data$Obs2, 
	histories=weta.data$detection.histories, start=c(0,2,0,-1,0), control=list(iter.max=50))

# MODEL WHICH ALSO FITS A SITE COVARIATE TO THE PROBABILITY OF DETECTION
numvisits=5
p.Browse <- matrix(rep(weta.data$siteCovar$Browsed, numvisits), ncol=numvisits)
fit4 <- siteocc(~1, ~p.Browse + weta.data$Obs1 + weta.data$Obs2, 
	histories=weta.data$detection.histories)

pom documentation built on May 2, 2019, 9:33 a.m.

Related to siteocc in pom...