That's not the -bootstrap- command, it's -xtivreg2- which complains if
you specify i(var) when var is not the i specified by -tsset-:
use http://fmwww.bc.edu/ec-p/data/macro/abdata.dta, clear
tsset id year
xtivreg2 ys k (n=l2.n l3.n), fe i(emp)
On 8/29/07, Erasmo Giambona <[email protected]> wrote:
> Thanks Austin. This runs! However, I had to use first tsset, clear. I
> was getting the error message below. I am not sure I understand why
> the bootstrapping command was bothered by the fact I had used tsset
> before. Any suggestions?
> Erasmo
>
> time and panel variables previously tsset -- may not be changed by
> options t() and i() -- use tsset to change them
> an error occurred when bootstrap executed xtivreg2
>
>
>
> On 8/29/07, Austin Nichols <[email protected]> wrote:
> > Erasmo--
> > At a minimum, you probably need the cluster() and idcluster() options
> > on -bootstrap- (see -help bootstrap-) so you are not resampling from N
> > obs, but M clusters (each panel) and there is a new id variable to
> > supply to your cluster() option on -xtivreg2-. Something like:
> >
> > bootstrap, r(1000) cl(gvkey) id(g): xtivreg2 `v', first cl(g) fe i(g)
> >
> > might work.
> > As no doubt Stas Kolenikov will point out, -bootstrap- is not
> > guaranteed to solve your problems.
> >
> > On 8/29/07, Erasmo Giambona <[email protected]> wrote:
> > > Dear Statalisters,
> > > Is it possible to bootstrap clusters after XTIVREG2?
> > > I use the following code:
> > >
> > > bootstrap, reps(1000): xtivreg2 variables (….), first robust
> > > cluster(gvkey) fe i (gvkey)
> > >
> > > and I get the following error message:
> > >
> > > repeated time values within panel
> > > the most likely cause for this error is misspecifying the cluster(),
> > > idcluster(), or group() option
> > >
> > > Any suggestions on what I am doing wrong?
> >
> > *
> > * For searches and help try:
> > * http://www.stata.com/support/faqs/res/findit.html
> > * http://www.stata.com/support/statalist/faq
> > * http://www.ats.ucla.edu/stat/stata/
> >
>
> *
> * For searches and help try:
> * http://www.stata.com/support/faqs/res/findit.html
> * http://www.stata.com/support/statalist/faq
> * http://www.ats.ucla.edu/stat/stata/
>
*
* For searches and help try:
* http://www.stata.com/support/faqs/res/findit.html
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/