L1Regression: Computes a L1 multivariate regression This is the equivalent...

Description Usage Arguments Value Examples

View source: R/L1Regression.R

Description

Computes a L1 multivariate regression This is the equivalent of median regression when the response is possibly multivariate

Usage

1
2
L1Regression(Data.Y, Data.X, Weights, 
				InitialValue = "WLS", MaxIteration, epsilon, lambda)

Arguments

Data.Y

a numeric matrix, to act as response

Data.X

a numeric matrix, to act as covariates

Weights

a numeric matrix, to act as weights

InitialValue

a character, to denote how the initial estimate will be computed currently the only available option is WLS

MaxIteration

an integer, for the maximum number of iterations allowed

epsilon

a positive real number, as tolerance value for convergence

lambda

a real number between 0 and 1, to control the amount of update allowed in each iteration

Value

a list consisting of the iteration value at the last step, the difference in norms between the last two iterations, and the estimate of slope

Examples

1
2
3
4
5
6
 ## Not run: 
DataY = cbind(CCU12_Precip$Precip, CCU12_Precip$TMax);
DataX = cbind(rep(1, length(CCU12_Precip$Precip)), CCU12_Precip$TMin)			
A2 = L1Regression(DataY, DataX)
    		
## End(Not run)

UStatBookABSC documentation built on May 2, 2019, 8:24 a.m.