simOccttd {AHMbook} | R Documentation |

## Simulate time-to-detection occupancy data (single visits)

### Description

Function simulates time-to-detection occupancy design data under the model of Garrard et al. (2008), also see Bornand et al. (2014)

### Usage

```
simOccttd(M = 250, mean.psi = 0.4, mean.lambda = 0.3,
beta1 = 1, alpha1 = -1, Tmax = 10, show.plot = TRUE, verbose = TRUE)
```

### Arguments

`M` |
Number of sites |

`mean.psi` |
intercept of occupancy probability |

`mean.lambda` |
intercept of Poisson rate parameter |

`beta1` |
slope of continuous covariate B on logit(psi) |

`alpha1` |
slope of continuous covariate A on log(lambda) |

`Tmax` |
maximum search time (in arbitrary units, which are same as response), response will be censored at |

`show.plot` |
choose whether to show plots or not. Set to FALSE when running simulations. |

`verbose` |
if TRUE, output will be written to the console. |

### Value

A list with the values of the arguments input and the following additional elements:

`covA` |
Simulated values of covariate A, a vector of length M |

`covB` |
Simulated values of covariate B, a vector of length M |

`psi` |
Probability of occurrence at each site, a vector of length M |

`z` |
Realized occurrence at each site, a 0/1 vector of length M |

`ttd.temp` |
Uncensored simulated time-to-detection at each site, a vector of length M |

`ttd` |
Censored simulated time-to-detection at each site, a vector of length M |

`d` |
Censoring indicator, a 0/1 vector of length M |

`sum.z` |
Total number of sites occupied |

`n.obs` |
Total number of sites where the species was observed |

### Author(s)

Marc Kéry & Andy Royle

### References

Garrard, G.E., Bekessy, S.A., McCarthy, M.A., & Wintle, B.A. (2008) When have we looked hard enough? A novel method for setting minimum survey effort protocols for flora surveys. *Austral Ecology*, 33, 986-998.

Bornand, C.N., Kéry, M., Bueche, L., & Fischer, M. (2014) Hide and seek in vegetation: time-to-detection is an efficient design for estimating detectability and occurrence. *Methods in Ecology and Evolution*, 5, 433-442.

Kéry, M. & Royle, J.A. (2016) *Applied Hierarchical Modeling in Ecology* AHM1 - 10.12.1.

### Examples

```
# Generate data with the default arguments and look at the structure
tmp <- simOccttd()
str(tmp)
```

*AHMbook*version 0.2.9 Index]