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

multivreg

Multivariate linear regression


Description

Multivariate linear regression.

Usage

multivreg(y, x, plot = TRUE, xnew = NULL)

Arguments

y

A matrix with the Eucldidean (continuous) data.

x

A matrix with the predictor variable(s), they have to be continuous.

plot

Should a plot appear or not?

xnew

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

Details

The classical multivariate linear regression model is obtained.

Value

A list including:

suma

A summary as produced by lm, which includes the coefficients, their standard error, t-values, p-values.

r.squared

The value of the R^2 for each univariate regression.

resid.out

A vector with number indicating which vectors are potential residual outliers.

x.leverage

A vector with number indicating which vectors are potential outliers in the predictor variables space.

out

A vector with number indicating which vectors are potential outliers in the residuals and in the predictor variables space.

est

The predicted values if xnew is not NULL.

Author(s)

Michail Tsagris

R implementation and documentation: Michail Tsagris mtsagris@uoc.gr and Giorgos Athineou <gioathineou@gmail.com>

References

K.V. Mardia, J.T. Kent and J.M. Bibby (1979). Multivariate Analysis. Academic Press.

See Also

Examples

library(MASS)
x <- as.matrix(iris[, 1:2])
y <- as.matrix(iris[, 3:4])
multivreg(y, x, plot = TRUE)

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.