gmmDtest — performs D test of model comparaison for GMM
rd = gmmDtest(ugmm,rgmm,nr,np)
ugmm = tlist result for unrestricted estimation
rgmm = tlist result for restricted estimation
nr = number of parameter restriction
np = 'noprint' if the user does not want to print the results
rd a tlist with:
-rd('chistat') = test statisitc
-rd('pvalue') = pvalue of the test
-rd('df') = number of restrictions
uout=gmm('y',gmmopt,'exo=''X''','ivar=''X''','parm0=b0'); rout=gmm('y',gmmopt,'exo=''X(:,2:3)''','ivar=''X''','parm0=[0;0]','Win=W0','noprint'); rd = gmmDtest(uout,rout,1); Examples taken from gmmLin_d() : the first parameter is set to 0 and the model is reestimated with the prior weighting matrix, then the test is performed.