Learn R Programming

compositions (version 0.9-11)

mean.acomp: Mean amounts and mean compositions

Description

Compute the mean in the several approaches of compositional and amount data analysis.

Usage

mean.acomp(x,..., na.action=get(getOption("na.action")))
          mean.rcomp(x,..., na.action=get(getOption("na.action")))
          mean.aplus(x,..., na.action=get(getOption("na.action")))
          mean.rplus(x,..., na.action=get(getOption("na.action")))
          mean.rmult(x,..., na.action=get(getOption("na.action")))

Arguments

x
a classed dataset of amounts or compositions
...
further arguments to mean e.g. trim
na.action
The na.action to be used: one of na.omit,na.fail,na.pass

Value

  • The mean is given as a composition or amount vector of the same class as the original dataset.

Details

The different compositional approaches acomp, rcomp, aplus, rplus correpond to different geometries. The mean is calculated in the respective canonical geometry by applying a canonical transform (see cdt), taking ordinary mean.col and backtransforming. The Aitchison geometries imply that mean.acomp and mean.aplus are geometric means, the first one closed. The real geometry implies that mean.rcomp and mean.rplus are arithmetic means, the first one resulting in a closed composition. In all cases the mean is again an object of the same class.

See Also

clo, mean.col, geometricmean, acomp, rcomp, aplus, rplus

Examples

Run this code
data(SimulatedAmounts)
mean.col(sa.lognormals)
mean(acomp(sa.lognormals))
mean(rcomp(sa.lognormals))
mean(aplus(sa.lognormals))
mean(rplus(sa.lognormals))
mean(rmult(sa.lognormals))

Run the code above in your browser using DataLab