<< lad1 Single equation regressions mcov >>

grocer >> Single equation regressions > ladmod

ladmod

Estimate least absolute deviations regression for equations of a model

CALLING SEQUENCE

[model2,rlad1,...rladn]=ladmod(model,tsmat,indeq,arg1,...,argn)

PARAMETERS

Input

* model = a model tlist

* tsmat = a tsmat containing all data needed for estimating the equation (should be the tsmat associated to the model, created by function create_dbmod)

* indeq =

   - a string, the name of the equation to estimate or the keyword 'all' (to estimate all equations)

   - or an integer, the # of the equation in the model

* arg1,...,argn = arguments which can be:

   - a time series

   - a real (n x 1) vector

   - a string equal to the name of a time series or a (nx1) real vector between quotes

   - the string 'noprint' if the user doesn't want the to print the results of the regression

   - the string 'win=n' where n is the length of the Barlett window (default = floor(5*nobs^0.25))

   - the string 'dropna' if the user wants to delete NAs (this option should be used when dealing with daily and weekly TS)

   - 'save=%t' if the user wants to save the estimated coefficients in the model tlist

Output

* model2 = the model tlist, with the estimated coefficients if the option save has been swtiched to %t

* rlad1,...,rladn = a variable number of lad results tlists, each one corresponding to the results of the corresponding estimated equation

DESCRIPTION

Computes least absolute deviations regression for equations of a model.

EXAMPLE

global GROCERDIR
// load the model small
 load(GROCERDIR+'data\small.dat')
 // load the database small_db
 load(GROCERDIR+'data\small_db.dat')
 // set the bounds
 bounds('1980q1','2005q4');
// In the small model, estimate by least absolute deviations method the equation td_p3m_d1,
// save the estimated coefficients in the small model tlist
 // and store into tlist rp3m_d1 the whole estimation results:
 [small,rp3m_d1]=ladmod(small,small_db,'td_p3m_d1','save=%t');

AUTHOR

Éric Dubois 2019

Report an issue
<< lad1 Single equation regressions mcov >>