PD.age: Probability densities of clade age estimates derived from...

Description Usage Arguments Value References Examples

View source: R/PD.age.R

Description

PD.age assumes that fossil ages are known without error. In contrast, PD.age.unc incorporates fossil age uncertainty; in the latter, the minimum and maximum ages are treated as bounds on a uniform distribution. PD.age.plot plots the distribution of interest.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
PD.age(x, baseline = NULL, p.max = 0.99)

PD.age.unc(x, baseline = NULL, p.max = 0.99, reps = 1000, breaks = 100)

PD.age.plot(
  x,
  baseline = NULL,
  p.max = 0.99,
  reps = 1000,
  breaks = 100,
  line.col = "red",
  ...
)

Arguments

x

A vector of fossil ages (PD.age) or a matrix (PD.age.unc) of fossil ages in which the first column is the maximum age (or lower stratigraphic bound) and the second column is the minimum fossil age (upper stratigraphic bound) for each fossil.

baseline

Youngest bound of the distribution that could be the present (=0), or some other stratum of reference. If a baseline is not provided, the minimum value of ages is used as baseline and n-1 is used for the sample size instead of n for calculations (Solow, 2003).

p.max

The cumulative probability value to set a limit on the range of values for which the probability is calculated

reps

The number of pseudoreplicates used to account for fossil age uncertainty

breaks

The number of breaks or time intervals used to summarize the pseudoreplicates

line.col

The colour of the probability distribution curve. Only used with PD.age.plot

...

Further arguments passed to PD.age.plot

Value

In the case of PD.age and PD.age.unc, a dataframe with two columns: age (the geological age under consideration), and p (the associated probability for the clade origin).

References

\insertRef

Claramunt2015cladeage

\insertRef

Solow2003cladeage

\insertRef

Wang2007cladeage

\insertRef

Wang2010cladeage

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
## Not run: 
  # No fossil age uncertainty
  PD.age(c(54,31, 25, 14, 5));
  PD.age(c(54,31, 25, 14, 5), baseline=0);
  
  # With fossil age uncertainty
  PD.age.unc(cbind(c(56, 35, 25, 14, 6), c(50, 30, 25, 14, 3.5)), baseline=0);
  
  # Plot and fit of probability density function
  PD.age.plot(c(54,31, 25, 14, 5), p.max=0.99);
  curve(dexp(x-54, rate=0.062), col='black', lwd=3, add=TRUE);
  
  # Same, but use lognormal distribution
  PD.age.plot(cbind(c(56, 35, 25, 14, 6), c(50, 30, 25, 14, 3.5)));
  curve(dlnorm(x-50, meanlog=2.7, sdlog=1)*1.3, col='black', lwd=3, add=TRUE);
  
## End(Not run)

evolucionario/cladeage documentation built on Dec. 31, 2021, 8:48 a.m.