<< Generalized Method of Moments Generalized Method of Moments gmm1 >>

Grocer >> Generalized Method of Moments > gmm

gmm

Generalized Method of Moments

CALLING SEQUENCE

gmmout =gmm(namey,gmmopt,arg1,....,argn,)

PARAMETERS

Input

* namey = dependent variable vector (nobs x 1)

* gmmopt = a tlist (with 'gmm' as type) wich argument can be [default]:

  - gmmopt('momt') = filename of moment conditions REQUIRED

  - gmmopt('jake') = filename of Jacobian of moment condition ['numz0']

  - gmmopt('namep') = a vector containing the name of the parameters (optional)

  - gmmopt('gmmit') = number of GMM iterations [2]

  - gmmopt('maxit') = cap on number of GMM iterations [25]

  - gmmopt('tol') = convergence criteria for iterated GMM [1e-7]

  -  gmmopt('W0') = initial GMM weighting matrix ['Z'],

    . 'I' = identity

    . 'Z' = instruments (Z'Z)

    . 'C' = calculate from b

    . 'Win' = Fixed passed as Win

    . myfile = user's own sci-file

  - gmmopt('W') = subsequent GMM weighting matrix ['S'], inverse spectral density from gmmS

  - gmmopt('S') = type of spectral density matrix ['NW'],

    . 'W'=White

    . 'NW'=Newey-West (Bartlett)

    . 'G'=Gallant (Parzen)

    . 'H'=Hansen (truncated)

    . 'AM'=Andrews-Monahan

    . 'P'=Plain (OLS)

    . 'myfile' = user's sci-file

  - gmmopt('aminfo') = tlist if gmmopt('S')='AM' (see gmmAndMon.sci)

  - gmmopt('lags') = lags used in truncated kernel for S [nobs^(1/3)]

  - gmmopt('wtvec') = user-defined weights for Hansen matrix allows for seasonals, etc (eg. wtvec = [1 0 1])

  - gmmopt('Strim') = controls demeaning of moments in calculus of S [1],

    . 0 = none

    . 1 = demean e

    . 2 = demean Z'e

  - gmmopt('Slast') = 1 to recalculate S at final parameters estimate, 2 updates W [1]

  - gmmopt('null') = vector of null hypotheses for t-satistics [0]

  - gmmopt('plt) = 1 if the user want to graph the weights of GMM matrix [0]

  - gmmopt('prt') = 1 if the user want to print the optimization steps [0]

* arg1,...,argn = arguments that can be:

  - the string 'exo=[var1,var2,...,varm]' where var1, var2,..., varm are the exogenous variables. Write 'exo=[''var1'',''var2'',...,''varm'']' to keep variables names

  - the string 'ivar=[ivar1,ivar2,...,ivarm]' where ivar1, ivar2,..., ivarm are the instruments (same as for exo to keep the variable names)

  - the string 'parm0 =[p1;p2;...;pm]' where p1, p2,..., pm are the initial condition for he parameters

  -  Win user-defined initial weighting matrix (optionnal).  To use a function to calculate W0, don't use Win, but set gmmopt('W0') to gmmopt('U') and give the sci-file name in gmmopt('W')

  - 'noprint' if the user does not want to print the results

 

Output

* gmmout = a tlist with:

  - gmmout('meth') = 'GMM'

  - gmmout('y') = y data vector

  - gmmout('x') = x data matrix

  - gmmout('z') = instruments data matrix

  - gmmout('f') = function value

  - gmmout('nobs') = number of observations

  - gmmout('varn') = number of parameters to estimate

  - gmmout('north') = number of orthogonality conditions

  - gmmout('neq') = number of equations

  - gmmout('nz') = number of instruments

  - gmmout('J') = chi-square stat for model fit

  - gmmout('pvalue fit') = p-value for model fit

  - gmmout('beta') = coefficient estimates

  - gmmout('se') = standard errors of parameters

  - gmmout('vcovar') = cov matrix of parameter estimates

  - gmmout('tstat') = t-satistics for parms = null hypotheses

  - gmmout('pvalue') = p-values for coefficients

  - gmmout('m') = value moments

  - gmmout('M') = value of jacobian of moments conditions

  - gmmout('mse') = standard errors of moments

  - gmmout('varm') = covariance matrix of moments

  - gmmout('m tstat') = t-satistics for moments = 0

  - gmmout('m pvalue') = p-values for moments

  - gmmout('nz') = number of instruments

  - gmmout('nvar') = number of parameters

  - gmmout('df') = degrees of freedom for model

  - gmmout('null') = vector of null hypotheses for parameter values

  - gmmout('W0 type') = type of initial weighting matrix

  - gmmout('W type') = type of weighting matrix

  - gmmout('W') = weighting matrix

  - gmmout('S type') = type of spectral density matrix

  - gmmout('S') = spectral density matrix

  - gmmout('eflag') = error flag for spectral density matrix

  - gmmout('namey') = name of "endogenous" variables

  - gmmout('namex') = name of "exogenous" variables

  - gmmout('namez') = name of instruments

  - gmmout('prests') = boolean indicating presence of time series

  - gmmout('bounds') = if there is a times series in the regression, the bounds of the regression

DESCRIPTION

Performs Generalized Method of Moments estimation.

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');
// Example taken from gmmLin_d():

AUTHOR

Emmanuel Michaux 2007

Report an issue
<< Generalized Method of Moments Generalized Method of Moments gmm1 >>