<< olscmod Single equation regressions olspec >>

grocer >> Single equation regressions > olsmod

olsmod

Estimate by ols equations of a model

CALLING SEQUENCE

[model2,ols1,...,olsn]=olsmod(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:

   - 'noprint' if the user does not want to print the result (default: results are displayed on screen)

   - 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

* ols1,...,olsn = a variable number of olsc results tlists, each one corresponding to the results of the corresponding estimated equation

DESCRIPTION

Estimates by ols 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.dat')
// set the bounds
bounds('1980q1','2005q4');
// estimate the equation td_p3m_d1, save the esimated coefficients in the model
// tlist small and store into tlist rp3m_d1 the whole estimation results
[small,rp3m_d1]=olsmod(small,small_db,'td_p3m_d1','save=%t')

AUTHOR

Éric Dubois 2019

Report an issue
<< olscmod Single equation regressions olspec >>