Description Usage Arguments Details References
View source: R/red_Like_open.R
Used to calculate the negative of the log likelihood for open population models.
1 2 3 | red_Like_open(par, nit, l_s_c, g_s_c, g_t_c, o_s_c, o_t_c, p_s_c, p_t_c, K,
red, VERBOSE = FALSE, PARALLELIZE = FALSE, APA = FALSE,
precBits = 128)
|
par |
Vector with four elements (if no covariates), log(lambda), log(gamma), logis(omega), and logis(pdet). If there are covariates, include a starting value for each covariate. Order is: lambda, lambda site covariates, gamma, gamma site covariates, gamma time covariates, , omega site covariates, omega time covariates, pdet site covariates, pdet time covariates. |
nit |
R by T matrix of reduced counts with R sites/rows and T sampling occassions/columns. |
l_s_c |
list of lambda site covariates (list of vectors of length R (number of sites), each vector is a covariate). |
g_s_c |
list of gamma site covariates (list of vectors of length R (number of sites), each vector is a covariate) |
g_t_c |
list of gamma time covariates (list of vectors of length T (number of sampling occasions), each vector is a covariate) |
o_s_c |
list of omega site covariates (list of vectors of length R (number of sites), each vector is a covariate) |
o_t_c |
list of omega time covariates (list of vectors of length T (number of sampling occasions), each vector is a covariate) |
p_s_c |
list of pdet site covariates (list of vectors of length R (number of sites), each vector is a covariate) |
p_t_c |
list of pdet time covariates (list of vectors of length T (number of sampling occasions), each vector is a covariate) |
K |
Upper bound on summations (reduced counts upper bound). Currently only a vector of K values (one entry for each site) is possible, eg: K=rep(100,times=R). |
red |
Reduction factor |
VERBOSE |
If TRUE, prints the log likelihood to console. |
PARALLELIZE |
If TRUE, calculations will be done in parallel. Will use as many cores as have been made available (initialize with START_PARALLEL(num_cores)). |
APA |
Default is FALSE. If TRUE, will use arbitrary precision arithmetic in calculating the likelihood. Note that APA will be slower, however it is required for site population sizes larger than about 300. If APA = TRUE, then precBits specifies the number of bits of precision to use in the calculations. |
precBits |
If APA=TRUE, then precBits specifies the number of bits of precision for arbitrary precision arithmetic. |
Note that this function is adapted from the negative log likelihood function from the R package unmarked (Fiske and Chandler 2019), and uses the recursive method of computation described in Web Appendix A of Dail and Madsen 2011: Models for Estimating Abundance from Repeated Counts of an Open Metapopulation, published in Biometrics volume 67, issue 2.
Fiske, I., Chandler, R., Miller, D., Royle, A., Kery, M., Hostetler, J., Hutchinson, R., Smith, A., & Kellner, K. (2019). unmarked: Models for Data from Unmarked Animals (Version 0.13-1) [Computer software]. https://CRAN.R-project.org/package=unmarked
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.