Description Usage Arguments Details Value Examples
get_zib_likelihood
retuns the log-likelihood of observed counts of
detection at n_sites
tested n_tests
times each, given a certain
probability of occupancy and conditional probability of detection given site is
occupied.
1 | get_zib_likelihood(params, data)
|
params |
Numeric vector of length 2, where the first value is the probability of occupancy and the second is the probability of detection conditional on occupancy |
data |
Data.frame with at least two columns: one named obs_counts with the observed counts at each site, and once called n_tests with the number of tests per sites |
The Likehood function is described in equation (2) of Royle and Nichols (2003).
Royle, J. A., & Nichols, J. D. (2003). Estimating abundance from repeated presence–absence data or point counts. Ecology, 84(3), 777–790. http://doi.org/10.1890/0012-9658(2003)084[0777:EAFRPA]2.0.CO;2
The log-likelihood of the data given the parameter values under a model of Zero-Inflated Binomial
1 2 | data <- maldetectr::sim_zib_data( n_sites = 10, n_samples = 5, p_oc = 0.2, p_dt = 0.8 )
maldetectr::get_zib_likelihood( params = c( 0.5, 0.5 ), data = data )
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.