scaling_factor: Align MRB assemblages to the modern reference dataset

View source: R/scalingFactor.R

scaling_factorR Documentation

Align MRB assemblages to the modern reference dataset

Description

Interassemblage variation makes comparing mean ridge breadth (MRB) measurements difficult. This function scales a vector of MRB values to the modern Kralik and Novotny (2003) reference data set.

Usage

scaling_factor(mrbs, x = 0.95, type = "all", adult_age = 15)

Arguments

mrbs

the vector or column of your collected MRB measurements

x

what percentile should serve as the alignment point? (defaults to 95th percentile)

type

are you aligning your data to a subset of the reference data? Options are currently "all","males","females","adult males","adult females","adults". We highly suggest sticking with the default unless there is strong evidence otherwise.

adult_age

what age do you consider to be the threshold for adulthood? (only used when scaling to a subset of the reference data)

Value

the scaling factor that your data should be multiplied by in order to be analagous with modern MRB data

Examples

fake.data <-
data.frame(
 id.number = 1:100,
  mrb = c(rgamma(50,64,160), rgamma(50,2500,5000)),
  location = sample(c("palace", "domestic"), 100, replace = TRUE)
)

fake.data$mrb <- fake.data$mrb*scaling_factor(fake.data$mrb)


andburch/bayesianfingerprintr documentation built on March 11, 2023, 8:53 p.m.