View source: R/precision_functions.R
APE.Med | R Documentation |
APE.Med
calculates the average percent error (APE) for multiple age
determinations on the same fish. This function use the median of the
observed ages as the basis for APE calculation.
APE.Med(x)
x |
Numeric vector of independent age determinations from a single fish. |
The APE of the vector of ages x
from an individual fish.
APE
for APE calculation using the mean age as
the basis APE calculation.
Other APE functions:
APE()
#Example giving an estimate with an APE.Med of 0.0 APE.Med(c(1, 1, 1)) #Example using missing data APE.Med(c(1, NA, 2)) #Another example with missing data APE.Med(c(3, 5, 3, 4, NA, 6)) #Example showing how APE.Med can be used to calculate mean APE for many fish w <- seq(1, 10, 1) x <- seq(2, 11, 1) y <- seq(3, 12, 1) z <- seq(4, 13, 1) df <- data.table::rbindlist(apply(na.exclude(RedPorgy[, c(1, 2)]), 1, APE.Med)) df mean(data.frame(df)$APE) # Example with RedPorgy data data(RedPorgy) df <- data.table::rbindlist(apply(na.exclude(RedPorgy[, c(1,2)]), 1, APE.Med)) df mean(data.frame(df)$APE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.