calc.bias: Calculate Relationship Between "h" and Bias

View source: R/Francis_bomb_functions.R

calc.biasR Documentation

Calculate Relationship Between "h" and Bias

Description

calc.bias calculates a 95 bias in zone-count ages given appropriate bomb-carbon data.

Usage

calc.bias(
  ref,
  test,
  nsim = 5000,
  plot.type = 0,
  x,
  y,
  age,
  cy,
  age.err,
  s.age,
  y.err,
  bias.step = 5,
  bias.range = NULL
)

Arguments

ref, test

data frames representing reference and test data sets, respectively. Each row corresponds to one ref (test) datum and the columns represent data needed to perform the bomb carbon analyses. One column should represent each of the following input data in each data frame:

age

estimated age

age.err

standard deviation of estimated age

s.age

estimated age of the fish when the material taken from the otolith/aging structure for bomb carbon analysis was incorporated into the otolith (if this column is omitted it will be assumed that s.age = 0 for all samples)

cy

year of sampling, i.e. catch year

x

inferred year in which material taken from the otolith/aging structure for bomb carbon analysis was incorporated into the otolith (A warning will be output if x is inconsistent with other variables; should be x = cy - (age - s.age))

y

bomb carbon value (this will generally either be in C14 or fraction modern values)

y.err

standard deviation of bomb carbon value

Note, the columns in both the ref and test data frames representing each variable should be named the same.

nsim

number of simulated data sets used in generating the distribution of h values

plot.type

type of plot to produce (if 0, no plot is made). See function bias.plot.BR for available plot types

age, age.err, s.age, cy, x, y, y.err

Character strings representing the column names for each of the required elements (see above) in the ref and test data frames.

bias.step, bias.range

See get.h.from.bias for description

Value

A named list of length 4 with the following elements:

hdist

obersved h-statistic value for each of the simulations

h.conf.int

estimated 95% confidence interval for the h-statistic based on the simulations

hval

observed h-statistic at bias levels defined by the range of biases considered

bias.conf.int

95% confidence interval about aging bias

See Also

Other Bomb Radiocarbon Analyses: bias.plot.BR(), calc.h(), closest.pt(), get.h.from.bias(), get.nearest(), get.ref.line(), sim.hdist()

Examples

data(snapper)
snapper.red <- snapper[snapper$C14year >= 1955 & snapper$C14year <= 1972, ]
data(bluenose)
bluenose.red <- bluenose[bluenose$C14year >= 1955 &
  bluenose$C14year <= 1972, ]
bluenose.red <- bluenose.red[bluenose.red$C14 >= -506 &
  bluenose.red$C14 <= 94.0, ]
calc.bias(snapper.red, bluenose.red, nsim = 5000, plot.type = 0,
  x = "C14year", y = "C14", age = "age", cy = "catch.year",
  age.err = "age.err", s.age = "samp.age", y.err = "C14.err")
calc.bias(snapper.red, bluenose.red, nsim = 5000, plot.type = 1,
  x = "C14year", y = "C14", age = "age", cy = "catch.year",
  age.err = "age.err", s.age = "samp.age", y.err = "C14.err")
calc.bias(snapper.red, bluenose.red, nsim = 5000, plot.type = 2,
  x = "C14year", y = "C14", age = "age", cy = "catch.year",
  age.err = "age.err", s.age = "samp.age", y.err = "C14.err")

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