View source: R/MoosePopR_DomStrat_bootrep.R

MoosePopR_DomStrat_bootrep | R Documentation |

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.

```
MoosePopR_DomStrat_bootrep(
stratum.data,
selected.unit.data,
waypoint.data,
density = NULL,
abundance = NULL,
numerator = NULL,
denominator = NULL,
sight.model = NULL,
sight.beta = NULL,
sight.beta.cov = NULL,
stratum.var = "Stratum",
domain.var = "Domain",
stratum.total.blocks.var = "Total.Blocks",
stratum.total.area.var = "Total.Area",
block.id.var = "Block.ID",
block.area.var = "Block.Area",
conf.level = 0.9,
survey.lonely.psu = "fail",
check.args = TRUE
)
```

`stratum.data` |
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 stratum.total.blocks.var) and the total area of the stratum (see stratum.total.area.var) |

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

`waypoint.data` |
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 block.id.var). 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. |

`sight.model` |
A formula that identifies the model used
to estimate sightability. For example |

`sight.beta` |
The vector of estimated coefficients for the logistic regression sightability model. |

`sight.beta.cov` |
The covariance matrix of |

`stratum.var` |
Name of the variable in the data frames that identifies the classical stratum |

`domain.var` |
Name of the variable in the data frames that identifies the domain. |

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

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

`block.id.var` |
Name of the variable in the data frames that identifies the block.id (the sampling unit) |

`block.area.var` |
Name of the variable in data frames that contains the area of the blocks (area of sampling unit) |

`conf.level` |
Confidence level used to create confidence intervals. |

`survey.lonely.psu` |
How to deal with lonely PSU within strata. See |

`check.args` |
Should arguments be checked. Turn off for extensive bootstrapping to save time. |

A list containing the input data (`input.data`

),
the bootstrap replicate (`boot.data`

), 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. cschwarz.stat.sfu.ca@gmail.com.

To Be Added.

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

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.