calc_hcwt.ty: (SPFI) Calculate the CWT harvest rate parameters grouped by...

Description Usage Arguments Value Examples

Description

This is equivalent to equation 2 in the draft SPFI document. This function does a single estimate of the harvest rate values. It does not perform iterations to optimize.

Usage

1
calc_hcwt.ty(r.ty.sum, d.tsa, n.ysa)

Arguments

r.ty.sum

Output from calc_ty.sum.

d.tsa

Output from calc_d.tsa.

n.ysa

Synonymous with CWTPop in VB or: hrj.df[hrj.df$data.type=="Pop" & hrj.df$fishery.index == 1,]

Value

A data frame of the harvest rate parameter estimates grouped by fishery stratum and year.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
## Not run: 
#look to \code{\link{buildSPFIscript}} for creating hrj.df
hrj.df <- hrj.df[hrj.df$spfiflag==1,]
cwtpop <- hrj.df[hrj.df$data.type=="Pop" & hrj.df$fishery.index == 1 & hrj.df$Stock.Number %in% stock.subset,]
cwtpop <- subset(cwtpop,select = -fishery.index) #n.ysa
cwtcatch <- hrj.df[hrj.df$data.type=="NomCat" & hrj.df$fishery.index %in% fishery.subset & hrj.df$Stock.Number %in% stock.subset,]
if(region=="seak") cwtcatch <- adjustAlaska(x = cwtcatch, data.catch = data.catch)
r.ty.sum <- calc_ty.sum(x = cwtcatch, newvar.name = "r.ty.sum")
d.tsa <- calc_d.tsa(r.tsa.sum = r.tsa.sum, n.ysa = cwtpop, standardize.bol = TRUE)
hcwt.ty <- calc_hcwt.ty(r.ty.sum=r.ty.sum,  d.tsa = d.tsa, n.ysa = cwtpop)

## End(Not run)

MichaelFolkes/ctctools documentation built on May 7, 2019, 4:56 p.m.