[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

From |
"Wrede" <wrede@wiso.uni-koeln.de> |

To |
<statalist@hsphsun2.harvard.edu> |

Subject |
st: Ctd.: Problem with Bootstrapping panel data |

Date |
Tue, 24 May 2005 22:43:47 +0200 |

Hi there, I posted the same problem 2 weeks ago, but without any final success. The problem: I try to run bootstrap command together with xtabond estimation command. But according to the trace output, the program complains that A) my time variable is not tsset and B) that there are too many missing observations The command is: bootstrap "xtabond vardep varexp, robust" _b[ld.vardep] _b[d.varexp] _b[_cons], trace reps(100) cluster(id) There were two suggestions from Cédric and Jo (thank you both again for your help): A) introducing a new time variable to bridge time gaps and avoid the missing observation problem. B) Some kind of forcing STATA to tsset the data properly by rewriting the ado file. However, I dont believe that there should be an easier way, since the xtabond estimation command has no problem with the panel data. So why should there be a problem be using bootstrapping with it? Any suggestions are highly appreciated since I need to find a solution quite urgent :( Niko --------------------------------- The trace gives back: ... local tmax = r(tmax) capture local id "`r(panelvar)'" =capture local id "" if "`id'"=="" { = if ""=="" { di as err "must tsset data and specify panelvar" must tsset data and specify panelvar However, I did tsset my data again and again. Any suggestions? Thanks in advance Niko -----Ursprüngliche Nachricht----- Von: owner-statalist@hsphsun2.harvard.edu [mailto:owner-statalist@hsphsun2.harvard.edu] Im Auftrag von jyotsna puri Gesendet: Montag, 16. Mai 2005 23:40 An: statalist@hsphsun2.harvard.edu Betreff: RE: st: Bootstrapping panel data Niko, Are your panel unequally spaced or are there gaps in years? If so see the (copied and pasted) exchange I had a while ago. Hth. -Jo ---------------------------------------------------------------------------- --------- Hi Jo, I had that problem once. What you have to do is generate a new time variable to avoid r(2000) (no observations error) and tsset using this new one. For example: (notice that d73 to d98 are time dummies) gen time2 =. ; replace time2 = 1 if d73 == 1 ; replace time2 = 2 if d78 == 1 ; replace time2 = 3 if d83 == 1 ; replace time2 = 4 if d88 == 1 ; replace time2 = 5 if d93 == 1 ; replace time2 = 6 if d98 == 1 ; tsset panchayat time2 ; Hope it works for you. Best, Monica L. -----Original Message----- From: owner-statalist@hsphsun2.harvard.edu [mailto:owner-statalist@hsphsun2.harvard.edu] On Behalf Of jyotsna puri Sent: Monday, December 06, 2004 7:32 AM To: statalist@hsphsun2.harvard.edu Subject: RE: st: xtabond and 'no observations' Hi all, I am obviously not seeing something. I have a dataset for a land variable (sr1tara), water(agwsc2), credit (crbadu1). There are 'id' variables for villages and unbalanced data is present for 6 years (maximum). I have tried to use the xtabond command and I get 'no observations'. There is some thing that I am obviously carelessly missing. Can someone help me out? At the minimum I do the following (output below). My questions: 1. Why am I getting 'no observations'? 2. Is this anything to do with the fact that my data is not balanced? (Shouldnt be. The abdata.dta - the example dataset provided by stata for xtabond is also unbalanced). I have obviously used other variables in other commands but it dosent work for even this minimal list... 3. This may have something to do with the note after 'tsset' which says I have data from 86 to 96, but with gaps. I have two types of 'missingness'. This is an unbalanced data - so all villages are not present for all years. I have tried xtabond for villages that are only present for all 6 years. No avail. There is also 'item non-response' i.e the village may be present but data for sr1tara is missing. I have tried two options. In the first, filling up with tsfill, full. In the second throwing out these observations completely, and then filling up with tsfill, full. I have also tried replacing 'missing' values of sr1tara with zeros and then using the command. No avail. -Jo Jyotsna (Jo) Puri pjyotsna@hotmail.com ----Original Message Follows---- From: "Wrede" <wrede@wiso.uni-koeln.de> Reply-To: statalist@hsphsun2.harvard.edu To: <statalist@hsphsun2.harvard.edu> Subject: st: Bootstrapping panel data Date: Sat, 21 May 2005 23:26:07 +0200 Hi statalisters, I am using panel data, which are tsset. I am using some xt commands like xtabond etc. Now I want to bootstrap the sample and re-run the tests. My problem: STATA complains that my data are not tsset. My code is: bootstrap "xtabond vardep varexp, robust" _b[ld.vardep] _b[d.varexp] _b[_cons], trace reps(100) cluster(id) The trace gives back: ... local tmax = r(tmax) capture local id "`r(panelvar)'" =capture local id "" if "`id'"=="" { = if ""=="" { di as err "must tsset data and specify panelvar" must tsset data and specify panelvar However, I did tsset my data again and again. Any suggestions? Thanks in advance Niko * * 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/

**Follow-Ups**:**RE: st: Ctd.: Problem with Bootstrapping panel data***From:*"jyotsna puri" <pjyotsna@hotmail.com>

**References**:**RE: st: Bootstrapping panel data***From:*"jyotsna puri" <pjyotsna@hotmail.com>

- Prev by Date:
**st: adding means to histograms (2)** - Next by Date:
**Re: st: Adding -nocons- to -mlbeta-** - Previous by thread:
**st: converting snapshot data into duration format** - Next by thread:
**RE: st: Ctd.: Problem with Bootstrapping panel data** - Index(es):

© Copyright 1996–2016 StataCorp LP | Terms of use | Privacy | Contact us | What's new | Site index |