as.paleoTS | R Documentation |
Combines information into an object of class paleoTS
as.paleoTS(
mm,
vv,
nn,
tt,
MM = NULL,
genpars = NULL,
label = NULL,
start.age = NULL,
oldest = c("first", "last"),
reset.time = TRUE
)
mm |
vector of sample means |
vv |
vector of sample variances |
nn |
vector of sample sizes |
tt |
vector of sample ages |
MM |
vector of true means (simulated data) |
genpars |
generating parameters (simulated data) |
label |
optional, label for time-series |
start.age |
optional, age of oldest sample |
oldest |
value indicating if the oldest sample is first or last in the sequence |
reset.time |
logical; if TRUE, then change time scale to start at t=0
and adjust |
This function combines data into a paleoTS
object. For
empirical data it may be more convenient to use read.paleoTS
.
If sample ages decrease through the sequence, as if given in millions of
years ago, tt
will automatically be converted to time elapsed from
the beginning of the sequence as long as reset.time
= TRUE.
a paleoTS
object
All model-fitting functions estimate the contribution of sampling
noise to the observed differences between samples. They do this assuming
that the trait is represented by sample means, which have sampling
variances equal to variance divided by sample size, vv/nn
. If one
is interested in analyzing statistics other than the sample mean (medians,
quantiles, or other statistics), use the the following procedure: set the
statistic in question as the mm
values, replace vv
with a
vector of the squared standard errors for each estimate (generated by other
means, for example bootstrapping), and set all values of nn
to one.
When fitting such time-series, be sure to set the argument pool = FALSE
.
read.paleoTS
x <- as.paleoTS(mm = rnorm(20), vv = rep(1, 20), nn = rep(25, 20), tt=0:19)
plot(x) # easier to use sim.Stasis()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.