Description Usage Arguments Value Examples
Simulate zero-inflated binomial data
1 | sim_zib_data(n_sites, n_samples, p_oc, p_dt, seed = 42)
|
n_sites |
Number of sites to simulate |
n_samples |
Number of observations at each site |
p_oc |
Probability of occupancy at site |
p_dt |
Probability of detection at site conditional on site being occupied |
seed |
Set the seed for reproduciability |
A data.frame of simulated data with n_sites
rows and three columns. An occupied_sites
column with 0 if site is not occupied and 1 if occupied; an n_tests
column, which indicates the number of times each site was sampled (all values in this column will be equal to n_samples
, and will be used in calculating the likelihood); and an obs_counts
column, which has the number of times a detection occurred (values will be 0 to a maximum of n_smaples
)
1 | maldetectr::sim_zib_data( n_sites = 10, n_samples = 5, p_oc = 0.2, p_dt = 0.8 )
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.