Learn R Programming

Compositional (version 1.1)

spatmed.reg: Spatial median regression

Description

Spatial median regression with Euclidean data.

Usage

spatmed.reg(y, x, xnew = NULL)

Arguments

y
A matrix with the compsitional data. Zero values are not allowed.
x
The predictor variable(s), they have to be continuous.
xnew
If you have new data use it, otherwise leave it NULL.

Value

  • A list including:
  • betaThe beta coefficients.
  • sebThe standard error of the beta coefficients.
  • estThe fitted or the predicted values (if xnew is not NULL).

Details

The objective function is the minimization of the sum of the absolute residuals. It is the multivariate generalisation of the median regression. This function is used by link{comp.reg}.

References

Biman Chakraborty (2003) On multivariate quantile regression. Journal of Statistical Planning and Inference http://www.stat.nus.edu.sg/export/sites/dsap/research/documents/tr01_2000.pdf

See Also

multivreg, comp.reg, alfa.reg, esov.compreg, diri.reg

Examples

Run this code
library(MASS)
x <- iris[, 3:4]
y <- iris[, 1:2]
mod1 <- spatmed.reg(y, x)
mod2 <- multivreg(y, x, plot = FALSE)

Run the code above in your browser using DataLab