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

Re: st: GMM estimation.

 From Nick Cox To statalist@hsphsun2.harvard.edu Subject Re: st: GMM estimation. Date Thu, 3 Jan 2013 12:01:52 +0000

```It seems to me that while you thank Al for his help you are ignoring
his advice without explaining why it is a bad idea or even irrelevant
as far as you are concerned.

I have no idea what partial adjustment models are, but some other

1. The bottom line here in this posting is the error message

could not calculate numerical derivatives --flat or discontinuous
region encountered

which is the same as that in a previous thread you started at

http://www.stata.com/statalist/archive/2012-12/msg00973.html

and so one response is to refer you to that thread. Jay Verkuilen gave
excellent advice, which again you are ignoring.

2. What you typed is legal as far as -gmm- is concerned, but on a
quick glance you are not specifying to -gmm- that what looks like an
error term

DP*{a0}*e_(it)

depends on one of the parameters and one of the variables. Again, I
think you need to explain why you did this. GMM experts may wish to
comment.

3. As you make clear you are estimating 7 parameters, and what's more,
they are tangled up with each other. That's a tough call at the best
of times, even without the fact that your model fit does not converge.
That point seemed to underline Al's advice.

4. The spelling is "Stata".

Nick

On Thu, Jan 3, 2013 at 11:30 AM, Usman Gilani <u.gilani@icloud.com> wrote:
> Dear Al Feiveson,
>
> thanks that is really helpful.
> below is the complete model that i'm interested in
>
> actually its a partial adjustment model
>
> y_(it)= (1-{b0})*y_(i.t-1)+{b0}*y*_(it) eq(1)
>
> where y*_(it) is the desired value,
>
>
> y*_(it)={a1}*w1_(it)+{a2}*w2_(it)+{a3}*w3_(it)+{a4}*w4_(it)+{a5}*w5_(it)+{a6}*w6_(it)+e_(it)
> eq(2)
>
> {b0} is the speed of adjustment coefficient, which is a function of
>
>  {b0}=(a0)*DP_(it) eq(3)
>
> after substituting eq.(2) and eq.(3) in eq(1) i get the following
>
> y_(it) =
> ({a0}*{a1}*w1_(it)*DP+(1-{a0}*DP)*y_(i,t-1)+{a0}*{a2}*DP_(it)*w2_(it)+{a0}*{a3}*DP_(it)*w3_(it)+{a0}*{a4}*DP_(it)*w4_(it)+{a0}*{a5}*DP_(it)*w5_(it)+{a0}*{a6}*DP_(it)*w6_(it))+DP*{a0}*e_(it)
>
>
> so the final model has following 7 unknown parameters
> {a0,a1…,a6}
>
> now i'm interested in estimating the above model with GMM in STATA 12.
>
> i'm putting the following equation in stata GMM equation box
>
> ({a0}*{a1}*w1*DP+(1-{a0}*DP)*lr1+{a0}*{a2}*DP*w2+{a0}*{a3}*DP*w3+{a0}*{a4}*DP*w4+{a0}*{a5}*DP*w5+{a0}*{a6}*DP*w6)
>
> my question, is that the correct way to input the equation ? because STATA
> giving me the error message "could not calculate numerical derivatives --
> flat or discontinuous region encountered"
>
> please suggests me how can I perform this estimation

*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/faqs/resources/statalist-faq/
*   http://www.ats.ucla.edu/stat/stata/
```