Estimate the expected and realised populations in a region, using a fitted spatially explicit capture–recapture model. Density is assumed to follow an inhomogeneous Poisson process in two dimensions. Expected N is the volume under a fitted density surface; realised N is the number of individuals within the region for the current realisation of the process (cf Johnson et al. 2010; see Note).
1 2 3 4 5 6 7 8 9 10 11 12 13
region.N(object, ...) ## S3 method for class 'secr' region.N(object, region = NULL, spacing = NULL, session = NULL, group = NULL, se.N = TRUE, alpha = 0.05, loginterval = TRUE, keep.region = FALSE, nlowerbound = TRUE, RN.method = "poisson", pooled.RN = FALSE, ncores = NULL, ...) ## S3 method for class 'secrlist' region.N(object, region = NULL, spacing = NULL, session = NULL, group = NULL, se.N = TRUE, alpha = 0.05, loginterval = TRUE, keep.region = FALSE, nlowerbound = TRUE, RN.method = "poisson", pooled.RN = FALSE, ncores = NULL, ...)
mask object defining the possibly non-contiguous region for which population size is required, or vector polygon(s) (see Details)
spacing between grid points (metres) if region mask is constructed on the fly
group – for future use
logical for whether to estimate SE(N-hat) and confidence interval
alpha level for confidence intervals
logical for whether to base interval on log(N)
logical for whether to save the raster region
logical for whether to use n as lower bound when computing log interval for realised N
character string for method used to calculate realised N (RN) and its sampling variance. ‘poisson’ or ‘MSPE’.
logical; if TRUE the estimate of realised N for a multi-session model is computed as if for combined sampling with all detectors (see Details)
integer number of threads to be used for parallel processing
other arguments (not used)
If the density surface of the fitted model is flat
object$model$D == ~1 or
object$CL == TRUE) then
E(N) is simply the density multiplied by the area of
and the standard error is also a simple product. In the conditional
likelihood case, the density and standard error are obtained by first
If, on the other hand, the density has been modelled then the density
surface is predicted at each point in
region and E(N) is
obtained by discrete summation. Pixel size may have a minor effect on
the result - check by varying
spacing. Sampling variance is
determined by the delta method, using a numerical approximation to the
gradient of E(N) with respect to each beta parameter.
The region may be defined as a mask object (if omitted, the mask
object will be used). Alternatively,
may be a SpatialPolygonsDataFrame object (see package sp), and a
raster mask will be constructed on the fly using the specified
make.mask for an example importing a
shapefile to a SpatialPolygonsDataFrame.
Note: The option of specifying a polygon rather than a mask for
region does not work if the density model in
spatial covariates: these must be passed in a mask.
Group-specific N has yet to be implemented.
Population size is adjusted automatically for the number of clusters
in ‘mashed’ models (see
mash). However, the population
size reported is that associated with a single cluster unless
regionmask is specified.
pooled.RN = TRUE handles the special case of a multi-session
model in which the region of interest spans several patches (i.e.,
sampling in each session is localised within
region. This is not
yet fully implemented.
ncores = NULL uses the existing value from the environment variable
par.region.N to apply
region.N in parallel to
se.N = FALSE, the numeric value of expected population size,
otherwise, a dataframe with rows ‘E.N’ and ‘R.N’, and columns as
|estimate||estimate of N (expected or realised, depending on row)|
|SE.estimate||standard error of estimated N|
|lcl||lower 100(1--alpha)% confidence limit|
|ucl||upper 100(1--alpha)% confidence limit|
|n||total number of individuals detected|
For multiple sessions, the value is a list with one component per session, each component as above.
keep.region = TRUE then the mask object for the region is
saved as the attribute ‘region’ (see Examples).
The area in hectares of the region is saved as attribute ‘regionarea’.
The estimates of expected and realised N are generally very similar, or identical, but realised N usually has lower estimated variance, especially if the n detected animals comprise a large fraction.
Realised N is given by R(N) = n + integral_over_B (1 - p.(X))D(X) dX (the second term represents undetected animals). This definition strictly holds only when region B is at least as large as the region of integration used to fit the model; only with this condition can we be sure all n detected animals have centres within B. The sampling variance of R(N), technically a mean square prediction error (Johnson et al. 2010), is approximated by summing the expected Poisson variance of the true number of undetected animals and a delta-method estimate of its sampling variance, obtained as for E(N).
By default, a shortcut is used to compute the sampling variance of realised N. With this option (RN.method = ‘poisson’) the sampling variance is the sampling variance of E(N) minus the estimate of E(N) (representing Poisson process variance). This has been found to give reliable confidence intervals in simulations (Efford and Fewster 2013).
If RN.method is neither ‘MSPE’ nor ‘poisson’ (ignoring case) then the estimate of expected N is also used for realised N, and the ‘poisson’ shortcut variance is used.
Johnson et al. (2010) use the notation μ(B) for expected N and N(B) for realised N in region B.
In our case, the relative SE (CV) of μ(B) is the same as that
for the estimated density D if D has been estimated using
the Poisson distribution option in
derived(). If D has been estimated with the binomial
distribution option, its relative SE for simple models will be the
same as that of N(B), assuming that B is the full extent
of the original mask.
Borchers, D. L. and Efford, M. G. (2008) Spatially explicit maximum likelihood methods for capture–recapture studies. Biometrics 64, 377–385.
Efford, M. G. and Fewster, R. M. (2013) Estimating population size by spatially explicit capture–recapture. Oikos 122, 918–928.
Johnson, D. S., Laake, J. L. and Ver Hoef, J. M. (2010) A model-based approach for making ecological inference from distance sampling data. Biometrics 66, 310–318.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
## Not run: ## routine examples using arbitrary mask from model fit region.N(secrdemo.0) region.N(secrdemo.CL) region.N(ovenbird.model.D) ## region defined as vector polygon ## retain and plot region mask temp <- region.N(possum.model.0, possumarea, spacing = 40, keep.region = TRUE) temp plot (attr(temp, "region"), type = "l") ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.