Bookmark and Share

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


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

RE: st: RE: "cluster(): too many variables" in ivreg2 despite latest version?


From   "Schaffer, Mark E" <[email protected]>
To   "[email protected]" <[email protected]>
Subject   RE: st: RE: "cluster(): too many variables" in ivreg2 despite latest version?
Date   Thu, 17 Oct 2013 13:07:25 +0000

JZ,

> -----Original Message-----
> From: [email protected] [mailto:owner-
> [email protected]] On Behalf Of Jen Zhen
> Sent: 17 October 2013 13:53
> To: [email protected]
> Subject: Re: st: RE: "cluster(): too many variables" in ivreg2 despite latest
> version?
> 
> Dear Mark,
> thanks a lot for your reply!
> 
> (1) Here is what Stata reports:
> 
> . which ivreg2, all
> C:\Users\UserJZ\ado\plus\i\ivreg2.ado
> *! ivreg2 3.1.07  28Jul2013
> *! authors cfb & mes
> *! see end of file for version comments
> 
> (2) I downloaded them from here:
> http://ideas.repec.org/c/boc/bocode/s425401.html
> There it says: Date of revision: 28 Jul 2013.
> 
> (3) Good point about the livreg2.mlib.
> Now I have downloaded that too, i.e. opened the text in the browser, copied the
> full text into a Notepad file and saved that to my Desktop.

That's not going to work, I think.  The mlib file is a binary file.  Putting through a browser and text editor the way you've done will probably corrupt it.

--Mark

> Like with the hlp files, I have then changed the ending from txt into mlib and
> saved in my PLUS/l directory.
>  This seems to have had an effect in that I now get a different error message:
> 
> . ivreg2 depvar controlvar (endogreg = instrument), cluster(dimension1
> dimension2)
> struct ms_vcvorthog undefined
> (763 lines skipped)
> (error occurred while loading ivreg2.ado) r(3000);
> 
> So presumably I'm now a good step closer, albeit not completely there yet?
> 
> Thank you so much,
> JZ
> 
> 
> On Thu, Oct 17, 2013 at 2:33 PM, Schaffer, Mark E <[email protected]>
> wrote:
> > JZ,
> >
> > Re: (1), exactly what does -which ivreg2, all- report?  When you say you
> downloaded the "2013 versions", from where you did download them and how?
> And have you also downloaded the Mata library file livreg2.mlib?
> >
> > --Mark
> >
> >> -----Original Message-----
> >> From: [email protected] [mailto:owner-
> >> [email protected]] On Behalf Of Jen Zhen
> >> Sent: 17 October 2013 13:01
> >> To: [email protected]
> >> Subject: st: "cluster(): too many variables" in ivreg2 despite latest version?
> >>
> >> Dear listers,
> >>
> >> (1) When specifying two-dimensional clustering in -ivreg2-,
> >> ivreg2 depvar controlvar (endogreg = instrument), cluster(dimension1
> >> dimension2), I always get the error "cluster(): Too many variables specified".
> >>
> >> Many earlier posts on the topic on Statalist suggest that this
> >> problem should be solved by ensuring to have at least the 2010
> >> version of -ivreg2-. While my Stata cannot be updated automatically,
> >> I have downloaded 2013 versions of both
> >> ivreg2 and of ranktest, and I have also checked -which ivreg2, all-
> >> that I currently have only that 1 version of the ado file in my PLUS ado file
> path.
> >> Nonetheless the problem persists. Would anyone know what else I could try?
> >> Does ivreg2 maybe require any other ado files that might also need
> >> manual updating?
> >>
> >> (2) Nichols 2007 recommends to have at least 50 different clusters
> >> and Angrist & Pischke similarly suggests to have at least 42. So I'm
> >> taking this into account when choosing on which dimensions to cluster
> >> my standard errors. What I'm wondering though is: Should I also make
> >> sure to have no or few clusters with fewer than ... observations? In
> >> particular, with the way I am currently clustering, I have a few
> >> clusters with just 2 observations, although 95% of my clusters have
> >> more than 17. With 2 way clustering, any such requirement would
> presumably need to be independently satisfied for each of my 2 dimensions?
> >>
> >> Thank you so much and kind regards, JZ
> >> *
> >> *   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/
> >
> >
> > -----
> > Sunday Times Scottish University of the Year 2011-2013 Top in the UK
> > for student experience Fourth university in the UK and top in Scotland
> > (National Student Survey 2012)
> >
> > We invite research leaders and ambitious early career researchers to
> > join us in leading and driving research in key inter-disciplinary themes.
> > Please see www.hw.ac.uk/researchleaders for further information and
> > how to apply.
> >
> > Heriot-Watt University is a Scottish charity registered under charity
> > number SC000278.
> >
> >
> > *
> > *   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/
> *
> *   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/


----- 
Sunday Times Scottish University of the Year 2011-2013
Top in the UK for student experience
Fourth university in the UK and top in Scotland (National Student Survey 2012)

We invite research leaders and ambitious early career researchers to 
join us in leading and driving research in key inter-disciplinary themes. 
Please see www.hw.ac.uk/researchleaders for further information and how
to apply.

Heriot-Watt University is a Scottish charity
registered under charity number SC000278.


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


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index