<< ridge1 Single equation regressions robust >>

grocer >> Single equation regressions > ridgemod

ridgemod

Estimate equations of a model by Hoerl-Kennard Ridge Regression

CALLING SEQUENCE

[model2,rr1,....rrn]=ridgemod(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 index of the equation in the model

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

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

   - the string 'maxit=n' where n is the maximum number of iterations that can be performed (default = 100)

   - the string 'crit=n' where crit is the convergence criterion, used to assess if the difference between successive values of the autocorrelation coefficient is significant (default=sqrt(%eps))

   - the string 'dropna' if the user wants to use in the regression all dates with no NA value in any variable (the main use of this option should be when dealing with daily ts)

   - the string '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

* rr1,...,rrn = a variable number of ridge results tlists, each one corresponding to the results of the corresponding estimated equation

DESCRIPTION

Computes Hoerl-Kennard Ridge 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');
 // estimate by the Ridge method the equation td_p3m_d1, save the estimated coefficients in the model
 // tlist small and store into tlist rp3m_d1 the whole estimation results:
 [small,rp3m_d1]=ridgemod(small,small_db,'td_p3m_d1','save=%t')

AUTHOR

Éric Dubois 2019

Report an issue
<< ridge1 Single equation regressions robust >>