Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

comp.ppr

Projection pursuit regression for compositional data


Description

Projection pursuit regression for compositional data.

Usage

comp.ppr(y, x, nterms = 3, type = "alr", xnew = NULL, yb = NULL )

Arguments

y

A matrix with the compositional data.

x

A matrix with the continuous predictor variables or a data frame including categorical predictor variables.

nterms

The number of terms to include in the final model.

type

Either "alr" or "ilr" corresponding to the additive or the isometric log-ratio transformation respectively.

xnew

If you have new data use it, otherwise leave it NULL.

yb

If you have already transformed the data using a log-ratio transformation put it here. Othewrise leave it NULL.

Details

This is the standard projection pursuit. See the built-in funciton "ppr" for more details.

Value

A list includign:

runtime

The runtime of the regression.

mod

The produced model as returned by the function "ppr".

est

The fitted values of xnew if xnew is not NULL.

Author(s)

Michail Tsagris

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

References

Friedman, J. H. and Stuetzle, W. (1981). Projection pursuit regression. Journal of the American Statistical Association, 76, 817-823. doi: 10.2307/2287576.

See Also

Examples

x <- as.matrix( iris[, 1:4] )
x <- x/ rowSums(x)
ina <- iris[, 5]
mod <- comp.knn(x, x, ina, a = 1, k = 5)
table(ina, mod)
mod2 <- alfa.knn(x, x, ina, a = 1, k = 5)
table(ina, mod2)

Compositional

Compositional Data Analysis

v4.6
GPL (>= 2)
Authors
Michail Tsagris [aut, cre], Giorgos Athineou [aut], Abdulaziz Alenazi [ctb]
Initial release
2021-04-27

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.