Calculate the weighted mean age
Models the data as a Normal distribution with two sources of variance. Estimates the mean and ‘overdispersion’ using the method of Maximum Likelihood. Computes the MSWD of a Normal fit without overdispersion. Implements a modified Chauvenet Criterion to detect and reject outliers. Only propagates the analytical uncertainty associated with decay constants and ζ and J-factors after computing the weighted mean isotopic composition.
weightedmean(x, ...)
## Default S3 method:
weightedmean(
x,
from = NA,
to = NA,
random.effects = TRUE,
detect.outliers = TRUE,
plot = TRUE,
levels = NA,
clabel = "",
rect.col = c("#00FF0080", "#FF000080"),
outlier.col = "#00FFFF80",
sigdig = 2,
alpha = 0.05,
ranked = FALSE,
hide = NULL,
omit = NULL,
omit.col = NA,
...
)
## S3 method for class 'UPb'
weightedmean(
x,
random.effects = TRUE,
detect.outliers = TRUE,
plot = TRUE,
from = NA,
to = NA,
levels = NA,
clabel = "",
rect.col = c("#00FF0080", "#FF000080"),
outlier.col = "#00FFFF80",
sigdig = 2,
type = 4,
cutoff.76 = 1100,
alpha = 0.05,
cutoff.disc = discfilter(),
exterr = TRUE,
ranked = FALSE,
common.Pb = 0,
hide = NULL,
omit = NULL,
omit.col = NA,
...
)
## S3 method for class 'PbPb'
weightedmean(
x,
random.effects = TRUE,
detect.outliers = TRUE,
plot = TRUE,
from = NA,
to = NA,
levels = NA,
clabel = "",
rect.col = c("#00FF0080", "#FF000080"),
outlier.col = "#00FFFF80",
sigdig = 2,
alpha = 0.05,
exterr = TRUE,
common.Pb = 2,
ranked = FALSE,
hide = NULL,
omit = NULL,
omit.col = NA,
...
)
## S3 method for class 'ThU'
weightedmean(
x,
random.effects = TRUE,
detect.outliers = TRUE,
plot = TRUE,
from = NA,
to = NA,
levels = NA,
clabel = "",
rect.col = c("#00FF0080", "#FF000080"),
outlier.col = "#00FFFF80",
sigdig = 2,
alpha = 0.05,
ranked = FALSE,
i2i = TRUE,
detritus = 0,
hide = NULL,
omit = NULL,
omit.col = NA,
...
)
## S3 method for class 'ArAr'
weightedmean(
x,
random.effects = TRUE,
detect.outliers = TRUE,
plot = TRUE,
from = NA,
to = NA,
levels = NA,
clabel = "",
rect.col = c("#00FF0080", "#FF000080"),
outlier.col = "#00FFFF80",
sigdig = 2,
alpha = 0.05,
exterr = TRUE,
ranked = FALSE,
i2i = FALSE,
hide = NULL,
omit = NULL,
omit.col = NA,
...
)
## S3 method for class 'KCa'
weightedmean(
x,
random.effects = TRUE,
detect.outliers = TRUE,
plot = TRUE,
from = NA,
to = NA,
levels = NA,
clabel = "",
rect.col = c("#00FF0080", "#FF000080"),
outlier.col = "#00FFFF80",
sigdig = 2,
alpha = 0.05,
exterr = TRUE,
ranked = FALSE,
i2i = FALSE,
hide = NULL,
omit = NULL,
omit.col = NA,
...
)
## S3 method for class 'ThPb'
weightedmean(
x,
random.effects = TRUE,
detect.outliers = TRUE,
plot = TRUE,
from = NA,
to = NA,
levels = NA,
clabel = "",
rect.col = c("#00FF0080", "#FF000080"),
outlier.col = "#00FFFF80",
sigdig = 2,
alpha = 0.05,
exterr = TRUE,
ranked = FALSE,
i2i = TRUE,
hide = NULL,
omit = NULL,
omit.col = NA,
...
)
## S3 method for class 'ReOs'
weightedmean(
x,
random.effects = TRUE,
detect.outliers = TRUE,
plot = TRUE,
from = NA,
to = NA,
levels = NA,
clabel = "",
rect.col = c("#00FF0080", "#FF000080"),
outlier.col = "#00FFFF80",
sigdig = 2,
alpha = 0.05,
exterr = TRUE,
ranked = FALSE,
i2i = TRUE,
hide = NULL,
omit = NULL,
omit.col = NA,
...
)
## S3 method for class 'SmNd'
weightedmean(
x,
random.effects = TRUE,
detect.outliers = TRUE,
plot = TRUE,
from = NA,
to = NA,
levels = NA,
clabel = "",
rect.col = c("#00FF0080", "#FF000080"),
outlier.col = "#00FFFF80",
sigdig = 2,
alpha = 0.05,
exterr = TRUE,
ranked = FALSE,
i2i = TRUE,
hide = NULL,
omit = NULL,
omit.col = NA,
...
)
## S3 method for class 'RbSr'
weightedmean(
x,
random.effects = TRUE,
detect.outliers = TRUE,
plot = TRUE,
from = NA,
to = NA,
levels = NA,
clabel = "",
rect.col = c("#00FF0080", "#FF000080"),
outlier.col = "#00FFFF80",
sigdig = 2,
alpha = 0.05,
exterr = TRUE,
i2i = TRUE,
ranked = FALSE,
hide = NULL,
omit = NULL,
omit.col = NA,
...
)
## S3 method for class 'LuHf'
weightedmean(
x,
random.effects = TRUE,
detect.outliers = TRUE,
plot = TRUE,
from = NA,
to = NA,
levels = NA,
clabel = "",
rect.col = c("#00FF0080", "#FF000080"),
outlier.col = "#00FFFF80",
sigdig = 2,
alpha = 0.05,
exterr = TRUE,
i2i = TRUE,
ranked = FALSE,
hide = NULL,
omit = NULL,
omit.col = NA,
...
)
## S3 method for class 'UThHe'
weightedmean(
x,
random.effects = TRUE,
detect.outliers = TRUE,
plot = TRUE,
from = NA,
to = NA,
levels = NA,
clabel = "",
rect.col = c("#00FF0080", "#FF000080"),
outlier.col = "#00FFFF80",
sigdig = 2,
alpha = 0.05,
ranked = FALSE,
hide = NULL,
omit = NULL,
omit.col = NA,
...
)
## S3 method for class 'fissiontracks'
weightedmean(
x,
random.effects = TRUE,
detect.outliers = TRUE,
plot = TRUE,
from = NA,
to = NA,
levels = NA,
clabel = "",
rect.col = c("#00FF0080", "#FF000080"),
outlier.col = "#00FFFF80",
sigdig = 2,
alpha = 0.05,
exterr = TRUE,
ranked = FALSE,
hide = NULL,
omit = NULL,
omit.col = NA,
...
)x |
a two column matrix of values (first column) and their
standard errors (second column) OR an object of class
|
... |
optional arguments |
from |
minimum y-axis limit. Setting |
to |
maximum y-axis limit. Setting |
random.effects |
if if |
detect.outliers |
logical flag indicating whether outliers should be detected and rejected using Chauvenet's Criterion. |
plot |
logical flag indicating whether the function should produce graphical output or return numerical values to the user. |
levels |
a vector with additional values to be displayed as different background colours of the plot symbols. |
clabel |
label of the colour legend |
rect.col |
Fill colour for the measurements or age estimates. This can
either be a single colour or multiple colours to form a colour
ramp (to be used if a single colour: multiple colours: a colour palette: a reversed palette: For empty boxes, set |
outlier.col |
if |
sigdig |
the number of significant digits of the numerical values reported in the title of the graphical output. |
alpha |
the confidence limits of the error bars/rectangles. |
ranked |
plot the aliquots in order of increasing age? |
hide |
vector with indices of aliquots that should be removed from the weighted mean plot. |
omit |
vector with indices of aliquots that should be plotted but omitted from the weighted mean calculation. |
omit.col |
colour that should be used for the omitted aliquots. |
type |
scalar indicating whether to plot the
^{207}Pb/^{235}U age ( |
cutoff.76 |
the age (in Ma) below which the
^{206}Pb/^{238}U age and above which the
^{207}Pb/^{206}Pb age is used. This parameter is
only used if |
cutoff.disc |
discordance cutoff filter. This is an object of
class |
exterr |
propagate decay constant uncertainties? |
common.Pb |
common lead correction:
|
i2i |
‘isochron to intercept’: calculates the initial (aka
‘inherited’, ‘excess’, or ‘common’)
^{40}Ar/^{36}Ar, ^{40}Ca/^{44}Ca,
^{207}Pb/^{204}Pb, ^{87}Sr/^{86}Sr,
^{143}Nd/^{144}Nd, ^{187}Os/^{188}Os,
^{230}Th/^{232}Th, ^{176}Hf/^{177}Hf or
^{204}Pb/^{208}Pb ratio from an isochron
fit. Setting |
detritus |
detrital ^{230}Th correction (only applicable
when
|
Let \{t_1, ..., t_n\} be a set of n age estimates
determined on different aliquots of the same sample, and let
\{s[t_1], ..., s[t_n]\} be their analytical
uncertainties. IsoplotR then calculates the weighted mean of
these data using one of two methods:
The ordinary error-weighted mean:
μ = ∑(t_i/s[t_i]^2)/∑(1/s[t_i]^2)
A random effects model with two sources of variance:
\log[t_i] \sim N(\log[μ], σ^2 = (s[t_i]/t_i)^2 + ω^2 )
where μ is the mean, σ^2 is the total variance and ω is the 'overdispersion'. This equation can be solved for μ and ω by the method of maximum likelihood.
IsoplotR uses a modified version of Chauvenet's criterion for outlier detection:
Compute the error-weighted mean (μ) of the n age determinations t_i using their analytical uncertainties s[t_i]
For each t_i, compute the probability p_i that that |t-μ|>|t_i-μ| for t \sim N(μ, s[t_i]^2 MSWD) (ordinary weighted mean) or \log[t] \sim N(\log[μ],s[t_i]^2+ω^2) (random effects model)
Let p_j \equiv \min(p_1, ..., p_n). If p_j<0.05/n, then reject the j^{th} date, reduce n by one (i.e., n \rightarrow n-1) and repeat steps 1 through 3 until the surviving dates pass the third step.
If the analtyical uncertainties are small compared to the scatter between the dates (i.e. if ω \gg s[t] for all i), then this generalised algorithm reduces to the conventional Chauvenet criterion. If the analytical uncertainties are large and the data do not exhibit any overdispersion, then the heuristic outlier detection method is equivalent to Ludwig (2003)'s ‘2-sigma’ method.
Returns a list with the following items:
a three element vector with:
t: the weighted mean
s[t]: the standard error of the weighted mean
ci[t]: the 100(1-α)\% confidence interval for
t
a three-element vector with the (over)dispersion and the lower and upper half-widths of its 100(1-α)\% confidence interval.
the Mean Square of the Weighted Deviates (a.k.a. ‘reduced Chi-square’ statistic)
the number of degrees of freedom of the Chi-square test for homogeneity (df=n-1, where n is the number of samples).
the p-value of a Chi-square test with df degrees of freedom, testing the null hypothesis that the underlying population is not overdispersed.
vector of logical flags indicating which steps are included into the weighted mean calculation
list of plot parameters for the weighted mean
diagram, including mean (the mean value), ci (a grey
rectangle with the 100[1-α]% confidence interval
ignoring systematic errors), ci.exterr (a grey rectangle
with the 100[1-α]% confidence interval including
systematic errors), dash1 and dash2 (lines marking
the overdispersion if random.effects=TRUE).
ages <- c(251.9,251.59,251.47,251.35,251.1,251.04,250.79,250.73,251.22,228.43) errs <- c(0.28,0.28,0.63,0.34,0.28,0.63,0.28,0.4,0.28,0.33) weightedmean(cbind(ages,errs)) data(examples) weightedmean(examples$LudwigMean)
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.