Learn R Programming

rgr (version 1.1.15)

logit: Logit transformation

Description

Undertakes a logit transformation on a vector of proportions.

Usage

logit(pp)

Arguments

pp

a vector of proportions in the range zero to one. The function may be used with a single proportion. Natural logarithms are used.

Value

z

a vector of the logit tranformations of the proportions p.

Details

Most analytical chemical data for major, minor and trace elements are of a closed form, i.e. for a sample they sum to a constant, whether it be percent, ppm (mg/kg), or some other units. It does not matter that only some components contributing to the constant sum are present in the matrix, the data are closed. As a result, as some elements increase in concentration others must decrease, this leads to statistics and graphical presentations that do not reflect the true underlying situation even in situations of univariate data analysis and display. The logit transformation is an appropriate transformation for univariate compositional data. However, for concentrations below 10% a logarithmic transform is sufficient. The inverse logit transform is the expit. Procedures for removing closure effects for multivariate data are additive log-ratios (alr), centred log-ratios (clr), and isometric log-ratios (ilr).

References

Filzmoser, P., Hron, K. and Reimann, C., 2009. Univariate statistical analysis of environmental (compositional) data: Problems and possibilities. Science of the Total Environment, 407(1/3):6100-6108.

See Also

expit, alr, clr, ilr, ltdl.fix.df

Examples

Run this code
# NOT RUN {
## Generate test data
p <- c(0.1, 0.5, 0.9)

## Undertake and display logit transformations
z <- logit(p)
z

## Clean-up
rm(p)
rm(z)
# }

Run the code above in your browser using DataLab