ols with specification test
[rols]=olspec1(y,x,names,ltest,test_default)
* y = a (n x 1) vector
* x = a (n x k) vector
* names = a tlist, typed 'names' with: anmes('name_foo') = a string, the name that will be given in the corresponding test in the results displayed
* ltest = a string, 'test=xxx' where xxx collects the names of the specification tests performed (for instance 'test=predfailin(0.5),predfailin(0.9), doornhans,arlm(4),hetero_sq')
* test_default = the testing function that will be used by default
* 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('like') = log-likelihood of 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('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
load(GROCERDIR+'data\bdhenderic.dat') [y,namey,x]=explouniv('delts(lm1-lp)',['delts(lp)','delts(lagts(1,lm1-lp-ly))','rnet','lagts(1,lm1-lp-ly)','cte'],['1964q3';'1989q2']) names=tlist(['names';'jbnorm';'doornhans';'hetero_sq';... 'chowtest';'predfailin';'arlm';'reset'],'Jarque and Bera',... 'Doornik and Hansen','hetero x_squared','Chow',... 'Chow pred. fail. ','AR','reset'); r=olspec1(y,x,names,list(),test_spec0) // diplay the estimated parameters r('beta') // display the specifiaction tests results and the corresponding p-values // note the olspec1 should be used only in other programs or for testing: olspec is the program to use if you want // a more user-friendly function r('spec_test') | ![]() | ![]() |