Probability of detection of the species in each location
log_prob_detect.RdComputes the probability of detection of the species in each location for the xsdm model, given environmental data and model parameters.
Usage
log_prob_detect(
env_dat,
mu,
sigltil,
sigrtil,
o_mat,
ctil,
pd,
return_prob = FALSE,
num_threads = RcppParallel::defaultNumThreads()
)Arguments
- env_dat
The environmental data array, dimensions
n_loc x n_time x p(number of locations x time-series length x number of environmental variables). Must be a 3-dimensional array with no missing values.- mu
Vector of optimal environmental values. Length
p=dim(env_dat)[3]. Unconstrained real numbers.- sigltil
Vector specifying width of the growth-environment function. Length
p=dim(env_dat)[3]. Positive real numbers,Infentries also allowed.- sigrtil
Vector specifying width of the growth-environment function. Length
p=dim(env_dat)[3]. Positive real numbers,Infentries also allowed.- o_mat
An orthogonal matrix, dimensions
pbyp.- ctil
Scalar. Relates to the center of the detection-link function.
- pd
Maximum probability of detection of the species. Parameter between 0 and 1.
- return_prob
Logical (default FALSE). Flag to return probabilities of detection instead their logs.
- num_threads
Number of threads for parallel computation. Defaults to
RcppParallel::defaultNumThreads().
Value
A vector of length equal to the number of locations, containing the probabilities of detection (or their logs) of the species in each location.