Biomass.fn: Calculates design based estimates from survey data for West...

View source: R/Biomass.fn.R

Biomass.fnR Documentation

Calculates design based estimates from survey data for West Coast surveys. The design based index is calculated based on the area of the strata and the mean catch by strata. See: Gunderson, D.R. and Sample, T.M. 1980. Distribution and abundance of rockfish off Washington, Oregon, and California during 1977. Marine Fisheries Review: March - April.

Description

The variables defining the strata must begin with the name in strat.vars and end with ".1" or ".2" (i.e., Depth_m.1) the strata are assumed to be continuous variables, thus have a lower and upper value defining them. The lower value does not necessarily have to be the same as the previous upper value. the stat.df dataframe is difficult to build up with more than one variable becuase it turns into a design where you have to define all areas, thus repeat the variables for one (like a design)

Usage

Biomass.fn(
  dir = NULL,
  dat,
  strat.vars = c("Depth_m", "Latitude_dd"),
  strat.df,
  printfolder = "forSS",
  outputMedian = TRUE,
  month = NA,
  fleet = NA,
  verbose = TRUE
)

Arguments

dir

directory where the output file will be saved

dat

data-frame of the data that has been by the PullCatch.fn

strat.vars

A vector of the strata variable names (i.e., c("Depth_m","Latitude_dd"))

strat.df

a dataframe with the first column the name of the stratum, the second column the area of the stratum, and the remaining columns are the high and low variables defining the strata created by the CreateStrataDF.fn

printfolder

the folder where files will be saved

outputMedian

T/F output median or the mean biomass estimate

month

month for SS

fleet

fleet number for SS

verbose

A logical that specifies if you want to print messages and warnings to the console. The default is TRUE.

Details

I calculate the variance given stratified sampling theory I work in normal space, then calculate the statistics if B is lognormal This is the Mean Ratio Estimate

Author(s)

Allan Hicks and Chantel Wetzel


nwfsc-assess/nwfscSurvey documentation built on April 25, 2024, 4:09 a.m.