Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
Attachment:
gmm_poi2.ado Attachment:
gmm_poi3.ado Attachment:
test_new.dta
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: st: gmm with two equations and one parameter
From
Wu Zhang <[email protected]>
To
[email protected]
Subject
Re: st: gmm with two equations and one parameter
Date
Tue, 7 Jun 2011 18:59:50 -0700 (PDT)
OK. I attach all the files.
my gmm command is:
gmm (gmm_poi2) (gmm_poi3), mylhs(y) myrhs(x) instruments(1:d1, noconstant)
instruments(2:d2, noconstant) vce(cluster id) myidvar(id) onestep
Thanks for your help!
----- Original Message ----
From: Brian P. Poi <[email protected]>
To: [email protected]
Sent: Tue, June 7, 2011 9:21:19 PM
Subject: Re: st: gmm with two equations and one parameter
On 06/07/2011 09:00 PM, Wu Zhang wrote:
> I follow gmm help like "http://www.stata.com/help.cgi?gmm"; In my moment
> evaluator program, I do not specify names of parameter, just use at[1,1],
>like:
>
>
> program gmm_ivreg
>
>
> version 11
>
>
> syntax varlist [if] , at(name) rhs(varlist) depvar(varlist)
>
>
> tempvar m
> quietly gen double `m' = 0 `if'
> local i 1
> foreach var of varlist `rhs' {
> quietly replace `m' = `m' + `var'*`at'[1,`i'] `if'
> local `++i'
> }
> quietly replace `m' = `m' + `at'[1,`i'] `if' // constant
>
>
> quietly replace `varlist' = `depvar' - `m' `if'
>
>
> end
>
> Could you find something wrong if I put two alike programs for equation 1 and
2
> respectively?
>
Well, we now know that you are using a moment evaluator program rather
than the interactive version of -gmm-. But unless we see *your* program
and the *exact* -gmm- command syntax you are using, there is no way to
know why you are having problems.
-- Brian Poi
-- [email protected]
*
* 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/
Description: Binary data
Description: Binary data
Description: Binary data