Learn R Programming

compositions (version 2.0-2)

rplus: Amounts i.e. positive numbers analysed as objects of the real vector space

Description

A class to analyse positive amounts in a classical (non-logarithmic) framework.

Usage

rplus(X, parts=1:NCOL(oneOrDataset(X)), total=NA, warn.na=FALSE,
        detectionlimit=NULL, BDL=NULL, MAR=NULL, MNAR=NULL, SZ=NULL)

Arguments

X

vector or dataset of positive numbers considered as amounts

parts

vector containing the indices xor names of the columns to be used

total

a numeric vectors giving the total amount of each dataset

warn.na

should the user be warned in case of NA,NaN or 0 coding different types of missing values?

detectionlimit

a number, vector or matrix of positive numbers giving the detection limit of all values, all columns or each value, respectively

BDL

the code for 'Below Detection Limit' in X

SZ

the code for 'Structural Zero' in X

MAR

the code for 'Missing At Random' in X

MNAR

the code for 'Missing Not At Random' in X

Value

a vector of class "rplus" representing a vector of amounts or a matrix of class "rplus" representing multiple vectors of amounts, by rows.

Missing Policy

Missing and Below Detecion Limit Policy is in mored detailed explained in compositions.missing.

Details

Many multivariate datasets essentially describe amounts of D different parts in a whole. When the whole is large in relation to the considered parts, such that they do not exclude each other, and when the total amount of each componenten is actually determined by the phenomenon under investigation and not by sampling artifacts (such as dilution or sample preparation) then the parts can be treated as amounts rather than as a composition (cf. rcomp, aplus).

In principle, amounts are just real-scaled numbers with the single restriction that they are nonnegative. Thus they can be analysed by any multivariate analysis method. This class provides a simple access interface to do so. It tries to keep in mind the positivity property of amounts and the special point zero. However there are strong arguments why an analyis based on log-scale might be much more adapted to the problem. This log-approach is provided by the class aplus.

The classes rcomp, acomp, aplus, and rplus are designed in a fashion as similar as possible in order to allow direct comparison between results obtained by the different approaches. In particular, the aplus logistic transform ilt is mirrored by the simple identity transform iit. In terms of computer science, this identity mapping is actually mapping an object of type "rplus" to a class-less datamatrix.

References

van den Boogaart, K.G. and R. Tolosana-Delgado (2008) "compositions": a unified R package to analyze Compositional Data, Computers & Geosciences, 34 (4), pages 320-338, 10.1016/j.cageo.2006.11.017.

See Also

iit,rcomp, aplus, princomp.rplus, plot.rplus, boxplot.rplus, barplot.rplus, mean.rplus, var.rplus, variation.rplus, cov.rplus, msd

Examples

Run this code
# NOT RUN {
data(SimulatedAmounts)
plot(rplus(sa.lognormals))

# }

Run the code above in your browser using DataLab