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)
secr
object output from secr.fit
If se.N = FALSE
, the numeric value of expected population size,
otherwise, a dataframe with rows `E.N' and `R.N', and columns as
below.
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.
If 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'.
If the density surface of the fitted model is flat
(i.e. object$model$D == ~1
or object$CL == TRUE
) then
\(E(N)\) is simply the density multiplied by the area of region
,
and the standard error is also a simple product. In the conditional
likelihood case, the density and standard error are obtained by first
calling derived
.
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
component of object
will be used). Alternatively, region
may be a SpatialPolygonsDataFrame object (see package sp), and a
raster mask will be constructed on the fly using the specified
spacing. See 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 object
uses
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.
Use par.region.N
to apply region.N
in parallel to
several models.
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.
region.N(secrdemo.0)
## Not run: ------------------------------------
# ## a couple more routine examples
# 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")
## ---------------------------------------------
Run the code above in your browser using DataLab