weightedmean: Calculate the weighted mean age

View source: R/average.R

weightedmeanR Documentation

Calculate the weighted mean age

Description

Computes the error weighted mean and MSWD of some samples taking into covariances.

Usage

weightedmean(ages, prefix = NULL)

Arguments

ages

an object of class results

prefix

is either a string with the prefix of the samples that need to be averaged, or a vector of sample names.

Value

a list with items:

avgt: the weighted mean age
err: the standard error of avgt
MSWD: the Mean Square of the Weighted Deviates

Examples

data(Melbourne)
ages <- process(Melbourne$X,Melbourne$irr,Melbourne$fract)
weightedmean(ages,"MD2-")

ArArRedux documentation built on July 21, 2026, 1:07 a.m.