The likelihood is maximized using optim
and some typically close, but quick to calculate, starting values.
If estimating composition of a separate variable, all samples with missing data for this variable must be removed
prior to running this function.
1 2 3 4 5 6 7 8 9 10 11 12 | MLEwrapper(
trapData,
tags,
GSIcol,
PBTcol,
strataCol,
adFinCol,
AI = TRUE,
optimMethod = "Nelder-Mead",
variableCols = NULL,
...
)
|
trapData |
a dataframe with a rwo for each individual and columns for GSI assignment, PBT assignment, etc. |
tags |
a dataframe with the first column containing names of PBT groups, and the second column containing tag rates |
GSIcol |
name of column containing GSI assignments. If you have no GSI information, create a column with the same value for all samples. |
PBTcol |
name of column containing PBT assignments |
strataCol |
name of column indicating the strata the observation belongs to |
adFinCol |
name of column containing adipose fin status - TRUE (or AI) being intact FALSE (or AD) being clipped, NA missing |
AI |
TRUE to analyze ad-intact fish, FALSE to analyze ad-clipped fish |
optimMethod |
the method to use first with |
variableCols |
name of column containing the variable to estimate composition for (optional) |
... |
other arguments to pass to |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.