Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: st: Correlation Coefficients for GMM Regressors

From   Stas Kolenikov <>
Subject   Re: st: Correlation Coefficients for GMM Regressors
Date   Mon, 11 Jul 2011 15:33:43 -0500

On Mon, Jul 11, 2011 at 12:22 PM, Jason Hecht <> wrote:
> Is it possible to estimate a matrix of correlation coefficients for
> explanatory variables used in a GMM model in STATA?

I am not sure why you need this, given that you have -correlate-...
but here's an example:

sysuse auto
reg mpg weight foreign
corr weight foreign
gmm (mpg - {b1}*weight - {b2}*length - {b0}) ( weight - {mw=3020} )
(length - {ml=187} ) ( (weight-{mw})^2 - {vw=6e5} ) ( (length-{ml})^2
- {vl=400}) ( (weight-{mw})*(length-{ml}) - sqrt({vw}*{vl})*{corrwl} )
, instruments( 1: weight length) winit(unadj, indep)

All equations are exactly identified in this example, but you'd have
to specify non-zero starting values for the variance parameters,
otherwise the minimizer cannot leave the zero defaults.

Stas Kolenikov, also found at
Small print: I use this email account for mailing lists only.
*   For searches and help try:

© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index