<< olspec1 Single equation regressions olst >>

grocer >> Single equation regressions > olspecmod

olspecmod

Estimate equations of a model by ols with specification test

CALLING SEQUENCE

[model2,rols1,...,rolsn]=olspecmod(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 = arguments which can be:

   - a time series

   - a real (n x p) vector

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

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

   - the string 'arlm(n)' where n is the order of the ar Lagrange multiplier test if the user wants another lag than 4

   - 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)

Output

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

* rols1,...,rolsn = a variable number of olspec results tlists, each one corresponding to the results of the corresponding estimated equation

DESCRIPTION

Performs ordinary least-squares and standard specification test (Chow in-sample stability tests computed at 50% and 90% of the sample; Doornik and Hansen normality test; heteroskedasticity test called xiª by D.F. Hendry; AutoRegressive Lagrange multiplier tests at order 4) or any tests given by the user for equations in 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('1990q1','2005q4');
// estimate the equation td_p3m_d1, performs the standard specification tests, save the estimated coefficients in the small model tlist
// and store into tlist rp3m_d1 the whole estimation results:
[small,rp3m_d1]=olspecmod(small,small_db,'td_p3m_d1','save=%t')
// change the tests performed:
[small,rp3m_d1]=olspecmod(small,small_db,'td_p3m_d1','save=%t' ,'test=doornhans,arlm(2),reset')

AUTHOR

Éric Dubois 2019

Report an issue
<< olspec1 Single equation regressions olst >>