Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down at the end of May, and its replacement, statalist.org is already up and running.


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

Re: st: Correlation Coefficients for GMM Regressors


From   Stas Kolenikov <skolenik@gmail.com>
To   statalist@hsphsun2.harvard.edu
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 <jhecht58@gmail.com> 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 http://stas.kolenikov.name
Small print: I use this email account for mailing lists only.
*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index