resampit: resampit: Simple bootstrapping of fish groups to generate CIs

Description Usage Arguments Author(s)

Description

resampit() is a function that re-samples (bootstraps) a table of group assignments (e.g., from PBT GSI, PIT tags, etc.) and then expands those groups according to group-specific tag rates to generate confidence intervals around group proportion estimates.

Usage

1
2
resampit(assignmentFile = NULL, assignmentColumn = "groups",
  tagRates = NULL, bootstraps = 500, ci = 0.9)

Arguments

assignmentFile

The .csv file containing the group (e.g, PBT) assignments including those fish that could not be assigned to a group.

assignmentColumn

The name of the column in assignmentFile containing the group assignments. In the case of PBT, this column should contain the hatchery and brood year (BY) combination for any assigned fish. For example, OtsRAPH08 may represent a fish that assigns to Rapid River hatchery broodstock spawned in 2008. Note that every group defined in this column MUST have a tagging rate defined in the tagRates file (see below). Otherwise, an error will print (e.g., "OtsRAPH08 has no tagging rate defined") and assignments for that group will NOT be expanded. Fish that did not assign to a group MUST contain "Unassigned" in this column.

tagRates

The .csv file containing tagging rates for any group defined in the assignmentColumn column of assignmentFile. The file should only contain 2 columns. The first column should contain group names that MUST match the group names used in the assignmentColumn column of assignmentFile. Tagging rates must be expressed as proportions.

bootstraps

The number of bootstraps to be performed.

ci

The confidence interval to be generated expreseed as a proportion (e.g., 0.90 or 0.95).

Author(s)

Mike Ackerman


mackerman44/stockCIs documentation built on May 21, 2019, 10:52 a.m.