calc_site_likelihood: Calculate the likelihood of the detections at a site

View source: R/calc_site_likelihood.R

calc_site_likelihoodR Documentation

Calculate the likelihood of the detections at a site

Description

Calculates the likelihood of a detection history given parameter values for occupancy and detection

Usage

calc_site_likelihood(
  pr_detection,
  detection_history,
  pr_occupancy,
  detected_at_site
)

Arguments

pr_detection

vector of detection probabilities, with length equal to the number of visits

detection_history

vector of detection history, with length equal to the number visits

pr_occupancy

numeric. the probability of occurrence at the site

detected_at_site

logical. was the species detected at the site?

Details

This calculates the likelihood formula,

I * (ψ ∏ p^y * (1 - p)^{1 - y}) + (1 - I) * ((1 - ψ) + ψ ∏ (1 - p))

Value

numeric. likelihood of the detection data given the parameters

See Also

See Appendix S1 in Broms, Hooten, and Fitzpatrick 2016 for information about the formula


philpatton/cowbird documentation built on March 2, 2023, 3:05 a.m.