Statalist


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

Re: st: AW: Using GMM with Moment-Evaluator Program


From   odongo kodongo <odongo.kodongo@gmail.com>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: AW: Using GMM with Moment-Evaluator Program
Date   Tue, 16 Feb 2010 18:37:21 +0200

Thanks Martin. I've already been told the source of the error.

On Tue, Feb 16, 2010 at 6:16 PM, Martin Weiss <martin.weiss1@gmx.de> wrote:

>
> <>
>
> " When I run it, I get the following error messages:"
>
>
>
> Which command did you enter into Stata when trying to "run it"?
>
>
>
> HTH
> Martin
>
>
> -----Ursprüngliche Nachricht-----
> Von: owner-statalist@hsphsun2.harvard.edu
> [mailto:owner-statalist@hsphsun2.harvard.edu] Im Auftrag von odongo
> kodongo
> Gesendet: Dienstag, 16. Februar 2010 16:50
> An: statalist@hsphsun2.harvard.edu
> Betreff: st: Using GMM with Moment-Evaluator Program
>
> Dear all,
>
> I am trying to run the following program, which in all respects, is similar
> to the illustration given in the "Help GMM" of Stata 11/SE.
>
> program tryagain
> version 11
> syntax varlist if, at(name) rhsvar(varlist) lhsvar(varlist)
> quietly {
>    tempvar xb
>    generate double `xb' = 0 `if'
>    local i = 1
>    foreach var of varlist `rhsvar' {
>        replace `xb' = `xb' + `at'[1,`i']*`var' `if'     // coefficients
>        local `++i'
>    }
>    replace `xb' = `xb' + `at'[1,`i'] `if'                // constant term
>    replace varlist = `lhsvar' - `xb' `if'                // model's
> residuals
> }
> end
>
> When I run it, I get the following error messages:
>
> error calling tryagain at initial values
> variable varlist not found
> r(111);
>
> end of do-file
>
> r(111);
>
> Going through the archives, I realized that another user, Laszlo Sandor,
> had
> a more or less similar problem on October 29, 2009. However, the responses
> he received do not seem useful in getting me out of my predicament.
>
> Can someone help me discover the source of the error?
> Thank you.
>
> *
> *   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/
>
>
> *
> *   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/
>

*
*   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   |   What's new   |   Site index