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: gmm with two equations and one parameter


From   Richard Williams <richardwilliams.ndu@gmail.com>
To   statalist@hsphsun2.harvard.edu, statalist@hsphsun2.harvard.edu
Subject   Re: st: gmm with two equations and one parameter
Date   Tue, 07 Jun 2011 22:37:17 -0500

I know nothing about the question, but I will repeat the often-noted point that attachments are considered the work of Satan on Statalist, as the list isn't equipped to handle them and they often come across as garbled. If most of Europe wasn't asleep right now five other people would have already made this point. You could just copy the text of your programs into your message or put your files on the web and provide a link.

As a sidelight, I would encourage everyone who wants to share files (and everyone else in the world too for that matter) to create a dropbox account. You get at least 2 GB of free online storage and can put things in a public folder that you can provide a URL for. It is also great if you work on multiple machines, e.g. a laptop and a desktop. You can either go to www.dropbox.com or better yet use this link http://db.tt/H8tHl0S which should get you a little added storage. If you have a .edu email account use it as you get more bonus storage that way. I just started using dropbox a few months ago and I am probably going to require it for students in my stats classes in the future so we can easily share files.

At 08:59 PM 6/7/2011, Wu Zhang wrote:
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 <brian@poiholdings.com>
To: statalist@hsphsun2.harvard.edu
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
    -- brian@poiholdings.com
*
*   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/




-------------------------------------------
Richard Williams, Notre Dame Dept of Sociology
OFFICE: (574)631-6668, (574)631-6463
HOME:   (574)289-5227
EMAIL:  Richard.A.Williams.5@ND.Edu
WWW:    http://www.nd.edu/~rwilliam

*
*   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