Learn R Programming

rgr (version 1.1.0)

orthonorm: Computation of an Orthonormal Basis Matrix

Description

Computes an othonormal basis matrix to be used for the back-transformation of ilr-based data and statistics to clr-based data and statistics.

Usage

orthonorm(p)

Arguments

p
the dimension of the p-space, the number of original variables.

Value

  • Vthe p by (p-1) orthormal basis matrix.

References

Filzmoser, P., Hron, K., Reimann, C. and Garrett, R., 2009. Robust factor analysis for compositional data. Computers & Geosciences, 35(9):1854-1861.

See Also

ilr, clr, gx.robmva.closed

Examples

Run this code
## Make test data available
data(sind)
attach(sind)
sind.mat <- as.matrix(sind[, -c(1:3)])
## Ensure all data are in the same units (mg/kg)
sind.mat2open <- sind.mat
sind.mat2open[, 2] <- sind.mat2open[, 2] * 10000

## Compute and display clr transformed data
prmatrix(clr(sind.mat2open))

## Compute ilr transformed data
sind.ilr <-ilr(sind.mat2open)

## Compute orthonormal basis matrix, sind is a 25 by 6 data set
V <- orthonorm(6)
prmatrix(V)

## Back-transform ilr transformed data to clr and display
temp <- sind.ilrprmatrix(temp)

## Clean-up and detach test data
rm(sind.ilr)
rm(temp)
rm(V)
detach(sind)

Run the code above in your browser using DataLab