wsValidate | R Documentation |
The Willis and empirical quantiles (EmpQ) methods to assess length-bias in a proposed standard weight equation.
wsValidate( object, df, pops, len, wt, min, max, w = 10, type = c("EmpQ", "Willis"), n.cutoff = 3, cutoff.tail = TRUE, qtype = 8, probs = 0.75, use.means = FALSE, quadratic = TRUE, weighted = FALSE, alpha = 0.05 ) ## S3 method for class 'willis' print(x, ...) ## S3 method for class 'willis' summary(object, ...) ## S3 method for class 'empq' coef(object, ...) ## S3 method for class 'empq' summary(object, ...) ## S3 method for class 'empq' anova(object, ...) ## S3 method for class 'empq' predict(object, ...) ## S3 method for class 'empq' fitPlot( object, pch = 16, col.pt = "black", col.mdl = "red", lwd.mdl = 3, lty.mdl = 1, xlab = "Midpoint Length Category", ylab = paste("Standardized", 100 * object$probs, "Percentile Mean Weight"), main = "EmpQ Method", ... )
object |
An object of class |
df |
A data frame that contains the length-weight data for each population. |
pops |
A string or numeric that indicates which column in |
len |
A string or numeric that indicates which column in |
wt |
A string or numeric that indicates which column in |
min |
A number that indicates the midpoint value of the smallest X-mm length category. |
max |
A number that indicates the midpoint value of the largest X-mm length category. |
w |
A number that indicates the widths for which to create length categories. |
type |
A string that indicates which type of bias detection method should be used. |
n.cutoff |
A numeric that indicates the minimum sample size in a length category that should be included in the EmpQ regression. Ignored if |
cutoff.tail |
A logical that indicates if all length categories larger than the lowest length category with a number of populations below |
qtype |
Type of quantile method to use. See description of types of quantile calculation methods in |
probs |
A number that indicates the probability of the quantile. Must be between 0 and 1. Ignored if |
use.means |
A logical that indicates whether mean mean weight rather than a quantile mean weight should be used in the EmpQ method. |
quadratic |
A logical that indicates whether a quadratic regression should be fit in the EmpQ method. Ignored if |
weighted |
A logical that indicates whether the regression in the EmpQ method should be weighted by the number of populations present in each length category. Ignored if |
alpha |
A numeric that indicates the rejection criterion to be used in the Willis method. Ignored if |
x |
An object saved from the |
... |
Additional arguments for methods. |
pch |
A single numeric that indicates what plotting character codes should be used for the points in |
col.pt |
A string used to indicate the color of the plotted points. |
col.mdl |
A string that indicates the type of color to use for the standard length-weight regression line. |
lwd.mdl |
A numeric that indicates the width of the line to use for the standard length-weight regression line. |
lty.mdl |
A numeric that indicates the type of line to use for the standard length-weight regression line. |
xlab |
A label for the x-axis of plot or |
ylab |
A label for the y-axis of plot or |
main |
A label for the main title of |
The main function can be used to assess length-bias in a proposed standard weight equation using either the method of Willis et al. (1991) (i.e., type="Willis"
) or the empirical quantiles (EmpQ) method of Gerow et al. (2004) (i.e., type="EmpQ"
). The Willis method begins by regressing the relative weight computed from the candidate standard weight equation (supplied in object
) for each individual in a population in the df
data frame against length. This is repeated for each population in df
. The number of positive and negative slopes from this regression that are statistically significant are counted and an exact binomial test is used to determine if there is a statistically equal number of each. If there is a statistically equal number of positive and negative significant slopes then the standard weight equation is said not to exhibit a length bias.
print
ing the Willis results will show the results for the individual regressions and a table that shows the number of significant negative and positive regression slopes. summary
for the Willis results also shows the number of significant negative and positive regression slopes and the results from the exact binomial tests (using binom.test
for whether the number of negative and positive slopes is the same or not.
The EmpQ method is performed by (1) computing the mean actual weight per w
-mm length category for each population, (2) computing the quantile given in probs
(default is 75th) of mean actual weight per length category across all populations, (3) standardizing the quantile mean weights by dividing each by the standard weight for the midpoint of the length categories using the proposed standard weight equation, and (4) regressing the standardized quantile mean weights against the length category midpoints. The regression can either be quadratic (i.e., quadratic=TRUE
) as proposed by Gerow et al. (2004) or n-weighted (i.e., weighted=TRUE
). In addition, length categories with fewer than ncutoff
populations are eliminated (see cutoff.tail
description above). A slope of zero for the relationship between standardized quantile mean weights and length category midpoints indicates that no length-based biases exist with the proposed standard weight equation.
For the EmpQ method, coef
, summary
, anova
, and predict
returns the typical results for the linear regression model used in the method. fitPlot
shows the standardized quantile mean weights versus midpoint length category with the EmpQ method regression line overlaid.
If type="Willis"
then a list is returned with the following items.
res.ind
is a data.frame with the results of the individual regressions.
res.tbl
is a table summarizing the number of positive and negative significant slopes.
res.test
contains the results for the exact binomial test.
If type="EmpQ"
then a list is returned with the following items:
n.by.pop
is a table of the number of populations represented in each length category.
lm.v
is the EmpQ regression model results.
regdata
is a data.frame used for the EmpQ regression.
quadratic
is a logical that indicates whether the quadratic regression was used.
weighted
is a logical that indicates whether a weighted regression was used.
probs
the numeric given in probs
.
Derek H. Ogle, DerekOgle51@gmail.com
Gerow, K.G., W.A. Hubert, R.C. Anderson-Sprecher. 2004. An alternative approach to detection of length-related biases in standard weight equations. North American Journal of Fisheries Management 24:903-910.
Willis, D.W., C.S. Guy, and B.R. Murphy. 1991. Development and evaluation of the standard weight (Ws) equation for yellow perch. North American Journal of Fisheries Management, 11:374-380.
rlp
and emp
.
## See examples in rlp(), emp(), and FroeseWs()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.