<< lad Single equation regressions ladmod >>

grocer >> Single equation regressions > lad1

lad1

Least absolute deviation method

CALLING SEQUENCE

[rlad]=lad1(y,x,crit,maxit)

PARAMETERS

Input

* y = a (n x 1) vector

* x = a (n x k) vector

* crit = a scalar, the convergence criterion (for example 1e-5' ; default = 1e-15)

* maxit = a scalar, the maximum # of iterations (for example 'itmax=10'; default=500)

Output

* rlad = a tlist with

   - rlad('meth') = 'lad'

   - rlad('y') = y data vector

   - rlad('x') = x data matrix

   - rlad('nobs') = nobs

   - rlad('nvar') = nvars

   - rlad('b_new') = bhat

   - rlad('yhat') = yhat

   - rlad('resid') = residuals

   - rlad('vcovar') = estimated variance-covariance matrix of b_new

   - rlad('sige') = estimated variance of the residuals

   - rlad('sigu') = estimated sum of squared residuals

   - rlad('ser') = standard error of the regression

   - rlad('tstat') = t-stats

   - rlad('pvalue') = pvalue of the b_news

   - rlad('dw') = Durbin-Watson Statistic

   - rlad('condindex') = multicolinearity cond index

   - rlad('prescte') = boolean indicating if the Rª can be calculated

   - rlad('iter') = # of iterations

   - rlad('conv') = convergence max(abs(bnew-bold))

   - rlad('weight') = weight used to do the last ols regression

DESCRIPTION

Performs least absolute deviations regression.

EXAMPLE

b = ones(5,1);
xmat = grand(100,4,'nor',0,1);
exo = [ones(100,1),xmat];
// create leptokurtic errors:
evec = rand(100,1,'n').^4;
endo = exo*b+evec;
result = lad1(endo,exo,sqrt(%eps),100);

AUTHOR

Éric Dubois 2019

Report an issue
<< lad Single equation regressions ladmod >>