<< gmmDiagW Generalized Method of Moments gmmLM >>

Grocer >> Generalized Method of Moments > gmmDtest

gmmDtest

performs D test of model comparaison for GMM

CALLING SEQUENCE

rd = gmmDtest(ugmm,rgmm,nr,np)

PARAMETERS

Input

* 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

 

Output

* rd = a tlist with:

  -rd('chistat') = test statisitc

  -rd('pvalue') = pvalue of the test

  -rd('df') = number of restrictions

DESCRIPTION

Performs D test of model comparison for efficient GMM as proposed by Newey and West (1987).

EXAMPLE

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');
W0 = uout('W');
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.

AUTHOR

Emmanuel Michaux 2007

Report an issue
<< gmmDiagW Generalized Method of Moments gmmLM >>