pool.var: Compute a pooled variance

pool.varR Documentation

Compute a pooled variance

Description

Computes a pooled variance from samples in a paleontological time-series

Usage

pool.var(y, nn = NULL, minN = NULL, ret.paleoTS = FALSE)

Arguments

y

either a paleoTS object, or a vector of sample variances

nn

a vector of sample sizes

minN

sample size below which variances are replaced with pooled variances. See Details.

ret.paleoTS

if TRUE, a paleoTS object is returned. If FALSE, the value of the pooled variance is returned.

Details

A pooled variance of a set of populations is the weighted average of the individual variances of the populations, with the weight for each population equal to its sample size minus one.

For many kinds of traits, variation levels tend to be similar among closely related populations. When this is true and sample sizes are low, much of the observed differences in variance among samples will be due to the high noise of estimated the variances. Replacing the observed variances of all populations (or only those with nn < minN) with the estimated pooled variance can reduce this noise.

Value

if ret.paleoTS = TRUE a paleoTS object with all (or some) variances replaced with the pooled variance; otherwise the pooled variance

Examples

data(cantius_L)
cant_all <- pool.var(cantius_L, ret.paleoTS = TRUE)   # replace all variances with pooled variance
cant_n5  <- pool.var(cantius_L, minN = 5, ret.paleoTS = TRUE)  # replace only pops with n < 5


paleoTS documentation built on Sept. 11, 2024, 9:18 p.m.