Wald F-test
resw=waldchi(R,r,resu,np)
* R = a (q x n-beta) matrix of linear constraints
* r = a (q x 1) vector of linear constraints values
* resu = a results tlist from an ols(), pfixed() regression
* np = 'noprint' if the user does not want to print the results
* resw = a results tlist with:
- resw('meth') = 'waldchi'
- resw('runcons') = results tlist of the unrestricted regression
- resw('chi') = Wald Chi-squared statistic
- resw('def') = degrees of freedom of the chi2
- resw('chi_pvalue') = p-value of the test
- resw('R') = (q x n-beta) matrix of linear constraints
- res('r') = q-vector of linear constraints values
load(GROCERDIR+'/data/bdhenderic.dat'); bounds('1964q3','1989q2'); rols=ols('delts(lm1-lp)','delts(lp)','delts(lagts(1,lm1))',... 'delts(lagts(1,lp))','delts(lagts(1,ly))','rnet','lagts(1,lm1-lp-ly)','cte'); // calling b the vector of coefficents, the constraints are: // b2=-b3 and b2=-b4 // hence: // * R= [0 1 1 0 0 0 0 ] // [ 0 1 0 1 0 0 0] // and r = [0] // [0] R=[0 1 1 0 0 0 0 ; 0 1 0 1 0 0 0]; r=[0;0]; waldchi(R,r,rols); | ![]() | ![]() |