Wald test for GMM with nonlinear restrictions
rwd = gmmNlWald(rgmm,R,np)
* rgmm = tlist result for unrestricted estimation
* R = (s x 1) vector of nonlinear restriction of the form R(p) = 0, example R = ['p1-1/p2';'p5-p3*p4'];
* np = 'noprint' if the user does not want to print the results
* rwd = a tlist with:
-rwd('chistat') = test statisitc
-rwd('pvalue') = pvalue of the test
-rwd('df') = number restriction
X = [ones(1000,1) grand(1000,1,'nor',0,1) grand(1000,1,'nor',0,1)]; b = [0;1;-1]; e = grand(1000,1,'nor',0,1); y = X*b + e; gmmopt = tlist(['gmm';'momt';'jake';'prt';'gmmit';'S']); gmmopt('prt')=1; gmmopt('gmmit') = 1; gmmopt('S')='W'; gmmopt('momt')='gmmLinM'; gmmopt('jake')='gmmLinJ'; b0=zeros(3,1); uout=gmm('y',gmmopt,'exo=''X''','ivar=''X''','parm0=b0'); R = 'p1'; rw=gmmNlWald(uout,R); //Examples taken from gmmLin_d(): Test if the first parameter is null | ![]() | ![]() |