<< olsc1 Single equation regressions olst >>

Grocer >> Single equation regressions > olspec

olspec

ordinary least squares with specification tests

CALLING SEQUENCE

[rols]=olspec(namey,arg1,...,argn)

PARAMETERS

Input

* namey = a time series, a real (nx1) vector or a string equal to the name of a time series or a (nx1) real vector between quotes

* argi = arguments which can be:

  - a time series

  - a real (nx1) vector

  - a real (nxk) matrix

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

  - a list of such elements

  - the string 'noprint' if the user doesn't want to display 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 'test=x1,...,xp' where xi is the name of a test function ('jbnorm', 'dornhans', 'chowtest', 'predfailin', 'arlm', 'hetero_sq' or 'reset')

 

Output

* rols = a results tlist with

  - rols('meth') = 'ols'

  - rols('y') = y data vector

  - rols('x') = x data matrix

  - rols('nobs') = # observations

  - rols('nvar') = # variables

  - rols('beta') = bhat

  - rols('yhat') = yhat

  - rols('resid') = residuals

  - rols('vcovar') = estimated variance-covariance matrix of beta

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

  - rols('sigu') = sum of squared residuals

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

  - rols('tstat') = t-stats

  - rols('pvalue') = pvalue of the betas

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

  - rols('condindex') = multicolinearity cond index

  - rols('prescte') = boolean indicating the presence or absence of a constant in the regression

  - rols('rsqr') = rsquared

  - rols('rbar') = rbar-squared

  - rols('f') = F-stat for the nullity of coefficients other than the constant

  - rols('pvaluef') = its significance level

  - rols('prests') = boolean indicating the presence or absence of a time series in the regression

  - rols('namey') = name of the y variable

  - rols('namex') = name of the x variables

  - rols('bounds') = if there is a timeseries in the regression, the bounds of the regression

  - rols('name_test') = the names of the specification

  - rols('spec_test') = a matrix with the values of the statistics of the specification tests in column 1 and the corresponding p-values in column 2

DESCRIPTION

A function that performs ordinary least squares and specification tests: they can be standard (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 test with 4 lags) or chosen by the user among the following: 'jbnorm', 'dornhans', 'chowtest', 'predfailin', 'arlm', 'hetero_sq' and 'reset'.

EXAMPLE

load(GROCERDIR+'/macros/grocer/db/bdhenderic.dat') ;bounds('1964q3','1989q2');
rols=olspec('delts(lm1-lp)','delts(lp)','delts(lagts(1,lm1-lp-ly))','rnet','lagts(1,lm1-lp-ly)','cte')
//provides the estimation of Hendry and Ericsson prefered equation along with the 5 default specification tests.
rols=olspec('delts(lm1-lp)','delts(lp)','delts(lagts(1,lm1-lp-ly))','rnet','lagts(1,lm1-lp-ly)','cte','arlm(2)')
// The same as above, except for the autocorrelation test, which is performed with 2 lags.
rols=olspec('delts(lm1-lp)','delts(lp)','delts(lagts(1,lm1-lp-ly))','rnet','lagts(1,lm1-lp-ly)','cte','test=doornhans,arlm(2),reset')
// Provides the estimation of Hendry and Ericsson prefered equation along with the Doornik and Hansen normality test,
// the autocorrelation test performed with 2 lag and Ramsey's reset test.

AUTHOR

Eric Dubois 2004

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