Ternary diagram of regression models {Compositional}R Documentation

Ternary diagram of regression models

Description

Ternary diagram of regression models.

Usage

ternary.reg(y, est, id, labs)

Arguments

y

A matrix with the compositional data.

est

A matrix with all fitted compositional data for all regression models, one under the other.

id

A vector indicating the regression model of each fitted compositional data set.

labs

The names of the regression models to appea in the legend.

Details

The points first appear on the ternary plot. Then, the fitted compositional data appear with different lines for each regression model.

Value

The ternary plot and lines for the fitted values of each regression model.

Author(s)

Michail Tsagris.

R implementation and documentation: Michail Tsagris mtsagris@uoc.gr.

References

Aitchison J. (1986). The statistical analysis of compositional data. Chapman & Hall.

See Also

ternary, ternary.mcr, diri.contour

Examples

x <- cbind(1, rnorm(50) )
a <- exp( x %*% matrix( rnorm(6,0, 0.4), ncol = 3) )
y <- matrix(NA, 50, 3)
for (i in 1:50) y[i, ] <- rdiri(1, a[i, ])
est <- comp.reg(y, x[, -1], xnew = x[, -1])$est
ternary.reg(y, est, id = rep(1, 50), labs = "ALR regression")

[Package Compositional version 6.8 Index]