Learn R Programming

velociraptr (version 1.0)

adaptiveOrigination: Adaptive Beta Functions

Description

Functions for placing confidence intervals on time of orignation or extinction using the Adaptive Beta Method.

Usage

adaptiveOrigination(Ages, Confidence = 0.95)

adaptiveExtinction(Ages, Confidence = 0.95)

Arguments

Ages

a numeric vector of fossil occurrence ages, expressed as millions of years ago.

Confidence

the desired confidence level

Value

A matrix listing the oldest or youngest observed fossil occurrence, the best inferred age of extinction or origination, and the upper confidence limit.

Details

Takes a numeric vector of fossil occurrence ages, expressed as millions of years ago, to estimate either the time of origination adaptiveOrigination or extinction adaptiveExtinction. This code was originally presented in Wang et al. (2015) "Adaptive credible intervals on stratigraphic ranges when recovery potential is unknown". Paleobiology 42:240256. This simplified version will only accept ages in millions of years. The full version can be found in the online supplement to the paper.

Note that this function will not accept more than 161 age observations. This is a limitation of the original function.

Examples

Run this code
# NOT RUN {
# Generate an exmaple dataset of fossil ages
FakeAges<-runif(50,50,100)

# Calculate the inferred age of extinction with 95% confidence.
adaptiveExtinction(FakeAges,Confidence=0.95)

# Calculate the inferred age of origination with 50% confidence.
adaptiveOrigination(FakeAges,Confidence=0.5)

# }

Run the code above in your browser using DataLab