dist.plot: Distribution Plot

View source: R/precision_functions.R

dist.plotR Documentation

Distribution Plot

Description

dist.plot creates a distribution plot that helps the researcher assess whether bias is present between two sets of age reads on the same individual fish. The plot is constructed using lattice graphics. It provides three unique pieces of information:

  1. 1:1 line showing the expected distribution of reads given no bias in age determinations between the paired reads

  2. linear regression line fit to the observed paired data for the individual reads

  3. text providing the number of times reader 2 assigned a fish an age, given reader 1 assigned that fish age "x"

Usage

dist.plot(R1, R2, R1.label = "Reader 1", R2.label = "Reader 2")

Arguments

R1

Numeric vector of independent age determinations from a single fish from Reader 1. This must be the same length as R2.

R2

Numeric vector of independent age determinations from a single fish from Reader 2. This must be the same length as R1.

R1.label

Text label for the x-axis (defaults to Reader 1) for the resultant plot

R2.label

Text label for the y-axis (defaults to Reader 2) for the resultant plot

Value

A xyplot using the package lattice depicting the distribution of reader 2 ages, given reader 1 assigned a fish a certain age.

See Also

Other Bias Plot Functions: bias.plot()

Examples

# Example with Red Porgy data
data(RedPorgy)
dist.plot(R1 = RedPorgy$R3.Age, R2 = RedPorgy$R4.Age, R1.label = "Reader 3",
   R2.label = "Reader 4")

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