# Single-season occupancy estimation

### Description

Functions to estimate occupancy from detection/non-detection data for a single season. `occSS`

is the general-purpose function, and `occSStime`

provides plots of detection probability against time. `occSS0`

and `occSScovSite`

are faster functions for simpler models with summarized data. See `occSSrn`

for the Royle-Nichols model for abundance-induced heterogeneity in detection probability.

### Usage

1 2 3 4 5 6 7 8 | ```
occSS(DH, model=NULL, data = NULL, ci=0.95, link=c("logit", "probit"), verify=TRUE)
occSStime(DH, model=p~1, data=NULL, ci=0.95, plot=TRUE, link=c("logit", "probit"),
verify=TRUE)
occSS0(y, n, ci=0.95, link=c("logit", "probit"))
occSScovSite(y, n, model=NULL, data = NULL, ci=0.95, link=c("logit", "probit"))
``` |

### Arguments

`DH` |
a 1/0/NA matrix (or data frame) of detection histories, sites x occasions. |

`model` |
a list of formulae symbolically defining a linear predictor for each parameter in terms of covariates. If NULL, an intercept-only model is used, ie, psi(.) p(.). |

`ci` |
the confidence interval to use. |

`data` |
a data frame containing the variables in the model. For |

`link` |
the link function to use, either logit or probit; see Links. |

`verify` |
if TRUE, the data provided will be checked. |

`plot` |
if TRUE (default), draws a plot of probability of detection vs time. |

`y` |
a vector with the number of detections at each site. |

`n` |
a scalar or vector with the number of visits (survey occasions) at each site. |

### Details

`occSS`

allows for psi or p to be modelled as a logistic function of site covariates or survey covariates, as specified by `model`

. It includes a built in `.time`

covariate which can be used for modelling p with time as a fixed effect, and `.Time`

for a linear or quadratic trend. A built-in `.b`

covariate corresponds to a behavioural effect, where detection depends on whether the species was detected on the previous occasion or not.

`occSStime`

allows for time-varying covariates that are the same across all sites, eg, moon-phase. A categorical time variable `.time`

and a time trend `.Time`

are built-in. A plot of detection probability vs time is produced if `plot=TRUE`

.

`occSS0`

implements a simple model with one parameter for probability of occupancy and one for probability of detection, ie. a `psi(.) p(.)`

model.

`occSScovSite`

allows for site covariates but not for occasion or survey covariates.

Numeric covariates in `data`

are standardised to facilitate convergence. This applies to binary covariates coded as 1/0; if this is not what you want, code these as TRUE/FALSE or as factors.

For speed, use the simplest function which will cope with your model. For example, you can run psi(.) p(.) models in `occSScovSite`

or `occSS`

, but `occSS0`

is much faster.

### Value

Returns an object of class `wiqid`

, which is a list with the following elements:

`call` |
The call used to produce the results |

`beta` |
Values of the coefficients of the terms in the linear predictors, with standard errors and confidence intervals. |

`beta.vcv ` |
The variance-covariance matrix for the beta estimates. |

`real` |
Estimates of occupancy and probability of detection on the real scale, with confidence intervals. |

`logLik` |
a vector with elements for log(likelihood), number of parameters, and effective sample size. If parameters |

There are `print`

, `logLik`

, and `nobs`

methods for class `wiqid`

.

### Benchmarks

Output has been checked against output from PRESENCE (Hines 2006) v.5.5 for the `salamanders`

and `weta`

data sets. Real values are mostly the same to 4 decimal places, though there is occasionally a discrepancy of 0.0001. AICs are the same.

### Author(s)

Mike Meredith

### References

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

MacKenzie, D I; J D Nichols; A J Royle; K H Pollock; L L Bailey; J E Hines 2006. *Occupancy estimation and modeling : inferring patterns and dynamics of species occurrence*. Elsevier Publishing.

Hines, J. E. (2006). PRESENCE - Software to estimate patch occupancy and related parameters. SGS-PWRC. http://www.mbr-pwrc.usgs.gov/software/presence.html.

### See Also

See the examples for the `weta`

data set. See `occ2sps`

for single-season two-species models and `occMS`

for multi-season models.

### Examples

1 2 3 4 5 6 7 8 9 10 11 12 | ```
# The blue ridge salamanders data from MacKenzie et al (2006) p99:
data(salamanders)
occSS(salamanders)
occSStime(salamanders, p ~ .time) # time as a fixed effect
occSStime(salamanders, p ~ .Time + I(.Time^2)) # a quadratic time effect
occSS(salamanders, p ~ .b)
# or use the fast functions with y, n format:
y <- rowSums(salamanders)
n <- rowSums(!is.na(salamanders))
occSS0(y, n)
occSScovSite(y, n)
``` |