perc.agr: Percent Agreement Estimation

View source: R/precision_functions.R

perc.agrR Documentation

Percent Agreement Estimation

Description

perc.agr calculates the percent agreement of two sets of age reads on the same fish. This function will calculate the percent agreement from +/- 0 years to +/- the number of years defined by levels, by 1 year increments.

Usage

perc.agr(Data, levels = 2)

Arguments

Data

Numeric data frame, with no NA values, representing paired age reads on the same individual fish.

levels

Numeric integer representing the maximum number of years you want to consider for the percent agreement analysis

Value

Object of class data.table and data.frame containing the percent agreement metrics for each year from +/- years to levels. The data.table will contain four columns:

Scale

+/- number of years considered for percent agreement calculation

n

total sample size for the analysis

agree

# of samples agreed upon by the readers, given that scale

perc.agree

proportinal agreement among the individual age reads

Examples

#Example - RedPorgy Dataset
data(RedPorgy)
perc.agr(na.exclude(RedPorgy[, c(1, 2)]), levels = 3)

ballengerj/FishyR documentation built on June 17, 2022, 10:33 p.m.