Description Usage Arguments Details Value Examples
This is equivalent to equation 1 in the draft SPFI document.
This function does a single estimate of the d
values. It does not
perform iterations to optimize.
1 | calc_d.tsa(r.tsa.sum, n.ysa, hcwt.ty = NULL, standardize.bol = FALSE)
|
r.tsa.sum |
Output from |
n.ysa |
Synonymous with |
hcwt.ty |
Output from |
standardize.bol |
A Boolean, default=FALSE. |
The initial call of this function will have no data for
hcwt.ty
. If this is true, then the values are set to 0.01 as is done
in the Visual Basic.
A data frame of the distribution parameter estimates grouped by fishery stratum, stock, and age.
1 2 3 4 5 6 7 8 9 10 11 | ## 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.tsa.sum <- calc_tsa.sum(x = cwtcatch, newvar.name = "r.tsa.sum")
d.tsa <- calc_d.tsa(r.tsa.sum = r.tsa.sum, n.ysa = cwtpop, standardize.bol = TRUE)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.