MoosePopR_DomStrat_bootrep: Generate a bootstrap replicate of data for call to...

View source: R/MoosePopR_DomStrat_bootrep.R

MoosePopR_DomStrat_bootrepR Documentation

Generate a bootstrap replicate of data for call to MoosePopR_DomStrat()


This function takes the data from a classical/domain stratification and generates a bootstrap replicate suitable for analysis using MoosePopR_DomStrat(). A sightability model is allowed which "adjusts" the input data for sightability. This can also be used for SightabilityPopR() models by forcing block areas to 1 and the total block area in stratum to the number of blocks to mimic a mean-per-unit estimator. See the vignette for examples of usage.


  density = NULL,
  abundance = NULL,
  numerator = NULL,
  denominator = NULL,
  sight.model = NULL,
  sight.beta = NULL,
  sight.beta.cov = NULL,
  stratum.var = "Stratum",
  domain.var = "Domain", = "Total.Blocks", = "Total.Area", = "Block.ID",
  block.area.var = "Block.Area",
  conf.level = 0.9,
  survey.lonely.psu = "fail",
  check.args = TRUE


A data frame containing for each combination of stratum and domain, the stratum id (see stratum.var), the domain id (see domain.var), the total number of blocks in the stratum (see and the total area of the stratum (see

A data frame containing information on the selected survey units. Required variables are the stratum (see stratum.var), domain (see domain.var), (see, and the area of the block (see block.area.var).

A data frame containing counts of moose in each group along with a variable identifying the stratum (see stratum.var), domain (see domain.var) and block (see Additional variables can be included such as covariates for the sightability function (not currently used in MoosePopR)

density, abundance, numerator, denominator

Right-handed formula identifying the variable(s) in the waypoint data frame for which the density, abundance, or ratio (numerator/denominator) are to be estimated.


A formula that identifies the model used to estimate sightability. For example observed ~ VegCoverClass would indicate that sightability is a function of the VegCoverClass variable in the survey data. The left hand variable is arbitrary. The right hand variables must be present in the data frame.


The vector of estimated coefficients for the logistic regression sightability model.


The covariance matrix of sight.beta


Name of the variable in the data frames that identifies the classical stratum


Name of the variable in the data frames that identifies the domain.

Name of the variable in the data frame that contains the total number of blocks in the stratum.

Name of the variable in the data.frame that contains the total stratum area.

Name of the variable in the data frames that identifies the (the sampling unit)


Name of the variable in data frames that contains the area of the blocks (area of sampling unit)


Confidence level used to create confidence intervals.


How to deal with lonely PSU within strata. See surveyoptions in the survey package.


Should arguments be checked. Turn off for extensive bootstrapping to save time.


A list containing the input data (, the bootstrap replicate (, and a data frame (boot.res) with the estimated density, or abundance or ratio along with its estimated standard error and large-sample normal-based confidence interval. The density/abundance/ratio over all strata is also given on the last line of the data.frame.


Schwarz, C. J.


To Be Added.


##---- See the vignettes for examples on how to use this function

SightabilityModel documentation built on March 7, 2023, 6:15 p.m.