View source: R/calculate_proportion.R
calculate_proportion | R Documentation |
calculate_proportion
takes output from a VAST run and calculates the proportion of biomass in different categories
calculate_proportion(
fit,
TmbData,
Index,
Expansion_cz = NULL,
year_labels = NULL,
years_to_plot = NULL,
strata_names = NULL,
category_names = NULL,
sample_size_method = c("Taylor_series", "sample_based"),
plot_legend = ifelse(TmbData$n_l > 1, TRUE, FALSE),
DirName = getwd(),
PlotName = "Proportion.png",
PlotName2 = "Average.png",
interval_width = 1,
width = 6,
height = 6,
xlab = "Category",
ylab = "Proportion",
n_samples = 250,
...
)
TmbData |
Formatted data inputs, from |
Index |
output from |
Expansion_cz |
matrix specifying how densities are expanded when calculating annual indices, with a row for each category
The 2nd column is used when |
year_labels |
character vector specifying names for labeling times |
years_to_plot |
integer vector, specifying positions of |
strata_names |
names for spatial strata |
category_names |
names for categories (if using package |
sample_size_method |
Method used to calculate the variance in proportions, which is then converted to an approximately equivalent multinomial sample size that can be used as input-sample-size in a subsequent stock assessment model. Options are:
The sample-based approximation is expected to have higher variance and therefore lower approximate sample size. However, it may also have poor performance in cases when variance estimates are imprecise (such that the multivariate-normal approximation to joint precision is poor), and has not been thoroughly groundtested in real-world cases. |
plot_legend |
Add legend for labelling colors |
DirName |
Directory for saving plot and table |
PlotName |
Name for plot |
interval_width |
width for confidence intervals |
width |
plot width in inches |
height |
plot height in inches |
... |
list of arguments to pass to |
Tagged list of output
Proportion of biomass for each category c, time t, and stratum l
Effective sample size (median across categories) for each time t and stratum l
For details regarding multivariate index standardization and expansion see https://cdnsciencepub.com/doi/full/10.1139/cjfas-2018-0015
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.