Description Usage Arguments Value Author(s) Examples
Calculates probability of capture, effective sampling area (ESA), expected number of captures
1 |
obj |
Object returned by SCRx.fn |
SO |
The number of sampling opportunities used to construct the data for the model fit in obj |
Mb |
Mb is an indicator variable that=1 if behavioral effects on capture histories are to be included in the estimate of capture probability, effective sampling area and expected number of captures. For example trap-happiness or trap shyness. |
Mbvalue |
Mbvalue gives the value associated with the behavioral effect of capture that should be incorporated into the estimates calculated by SCR.area. For example, Mbvalue=0 would mean no behavioral effect, while Mbvalue=1 would mean the full behavioral effect of capture. |
Msex |
Msex is an indicator variable that = 1 if detection probability was estimated seperately by sex |
Msexsigma |
Msex sigma is an indicatore variable that = 1 if sigma is to be estimated seperately by sex |
Xsex |
The value of sex to be used for ESA estimation. Xsex = 0 means female exposure probabilities are calculated, Xsex = 1 gives male exposure probabilities. Values between 0 and 1 will use a weighted mean of exposure probability. The default (NULL), will use the weighted mean assuming the estimated sex ratio, psi.sex. |
Mss |
Model indicator of statespace covariate. i.e., a covarate that affects density. Not yet fully integrated or tested. |
Xd |
Vector of the same length as the number of points in the statespace that supplies the spatial covariate indicated by Mss |
Meff |
Model indicator of trap-level "effort" covariate. |
Xeff |
A numeric value, giving the log-transformed effort to be used to estimate exposure probability, ESA, and expected number of captures. Should be of length=1, but could also give effort unique to each trap. The latter is not yet tested. |
iter |
character or numeric vector specifying iterations for which to calculate exposure probabilities and other estimates. If a character vector should be function that can be passed to apply (e.g. mean, median, quantile) or "all" (meaning perform the calculations for all iterations of the chain). If numeric, the particular iteration(s) for which parameter estimates are used to compute exposure probability and other estimates. |
scalein |
Scaling factor of statespace and trap coordinates to ESA estimate, e.g. if in meters, 1000 will transform area to kilometers^2 |
useSnowfall |
logical indicating whether to use the snowfall package to perform calculations. Can speed up calculations when examining many iterations |
nprocs |
Number of processors to use for multicore calculations with snowfall, passed to sfInit |
con.type |
Connection type to be used with snowfall. Defaults to "SOCK" |
... |
Optional arguments to be passed to apply when iter is a character vector giving a function. |
mcmchist |
a matrix giving the parameter values used to estimate exposure probability with the derived estimates for ESA and expected number of captures appended in the final two columns |
prob.cap |
a matrix of the exposure probabilities where each row represents a node of the statespace and each column represents an iteration at which these probabilities were captures |
Joshua Goldberg
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 | ## Load the mountain lion data
data("lions")
## Reformat the "captures" data into the standard encounter data file (EDF) format
newcaptures.lions<-cbind(
session = rep(1,nrow(captures.lions)),
individual=captures.lions[,2],
occasion=captures.lions[,3],
trapid=captures.lions[,1])
## No animals were removed (dead) so "alive" is a matrix of 1's
alive=matrix(1,nrow=length(unique(newcaptures.lions[,"individual"])),ncol=1)
## State-space covariate: just constant in this case
Xd<- rep(1,nrow(statespace.lions))
### old format
### scrobj<-list(traps=traps.lions,captures=captures.lions,statespace=statespace.lions)
scrobj<-list(
traps=traps.lions,
captures=newcaptures.lions,
statespace=statespace.lions,
alive=alive,
Xd=Xd)
test<-SCRh.fn(scrobj,ni=220, burn=20, skip=2,nz=200,
Msigma=1, Mb=0, Msex=0, Msexsigma=0, thinstatespace=4)
ESA <- SCR.area(obj=test, SO=1, Mb = 0, Mbvalue = NULL, Msex = 0, Msexsigma = 0, Xsex = NULL, Mss = 0, Xd = NULL, Meff = 0, Xeff = NULL, iter = "median", scalein = 1000, useSnowfall = FALSE, nprocs = 1, con.type = "SOCK", ...)
{ ~kwd1 }
{ ~kwd2 }
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.