SPAS.autopool {SPAS}R Documentation

Autopooling a Stratified-Petersen (SP) data set. This function applies pooling rules to pool a SPAS dataset to meeting minimum sparsity requirements .

Description

Autopooling a Stratified-Petersen (SP) data set. This function applies pooling rules to pool a SPAS dataset to meeting minimum sparsity requirements .

Usage

SPAS.autopool(
  rawdata,
  min.released = 100,
  min.inspected = 50,
  min.recaps = 50,
  min.rows = 1,
  min.cols = 1
)

Arguments

rawdata

An (s+1) x (t+1) of the raw data BEFORE pooling. The s x t upper left matrix is the number of animals released in row stratum i and recovered in column stratum j. Row s+1 contains the total number of UNMARKED animals recovered in column stratum j. Column t+1 contains the number of animals marked in each row stratum but not recovered in any column stratum. The rawdata[s+1, t+1] is not used and can be set to 0 or NA. The sum of the entries in each of the first s rows is then the number of animals marked in each row stratum. The sum of the entries in each of the first t columns is then the number of animals captured (marked and unmarked) in each column stratum. The row/column names of the matrix may be set to identify the entries in the output.

min.released

Minimum number of releases in a pooled row

min.inspected

Minimum number of inspections in a pooled column

min.recaps

Minimum number of recaptures before any rows can be pooled

min.rows, min.cols

Minimum number or rows and columns after pooling

Details

In many cases, the stratified set of releases and recapture is too sparse (many zeroes) or count are very small. Pooling rows and columns may be needed.

Data needs to be pooled both row wise and column wise if the data are sparse to avoid singularities in the fit. This function automates pooling rows or columns following Schwarz and Taylor (1998).

Value

A list with a suggest pooling.

Examples

conne.data.csv <- textConnection("
9  ,    21  ,     0  ,    0  ,    0  ,    0  ,   171
0  ,   101  ,    22  ,    1  ,    0  ,    0  ,   763
0  ,     0  ,   128  ,   49  ,    0  ,    0  ,   934
0  ,     0  ,     0  ,   48  ,   12  ,    0  ,   434
0  ,     0  ,     0  ,    0  ,    7  ,    0  ,    49
0  ,     0  ,     0  ,    0  ,    0  ,    0  ,     4
351,  2736  ,  3847  , 1818  ,  543  ,   191 ,     0")
conne.data <- as.matrix(read.csv(conne.data.csv, header=FALSE))
close(conne.data.csv)
 
SPAS.autopool(conne.data)

[Package SPAS version 2024.1.31 Index]