[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 |
AW: st: Bootstrapping panel data |

Date |
Sun, 22 May 2005 00:54:20 +0200 |

Hi Jo, Thanks for your immediate reply. I did the routine below and the tsset problem disappeared. However, now the r(2000) problem occured: insufficient observations to compute bootstrap standard errors no results will be saved The panel is unbalanced. However, I made the panel equally spaced by filling the remaining years with missing values. Now I tried three things: 1. Using the panel, equally spaced (i.e. every unit has 5 years) but with missing observations. 2. Using the panel, unequally spaced, with no missing observations. 3. Using just a fraction of the panel, the is equally spaced with no missings. 1. and 2. generated the r(2000) problem stated above. 3. worked. However, all my test worked with the unbalanced und sometime unequally spaced panel. I do not want to use bootstrap with only a fraction of information I have (this would be the exact opposite to the original intention of using bootstrap). Do you know any solution to get around this problem? Again, thank you very much for your immediate help. niko --------------- 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**:**st: converting snapshot data into duration format***From:*Patricia Vera Rojas <pverarojas@yahoo.es>

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

- Prev by Date:
**st: XTGEE drops observations** - Next by Date:
**st: Bootstrapping panel data** - Previous by thread:
**RE: st: Bootstrapping panel data** - Next by thread:
**st: converting snapshot data into duration format** - Index(es):

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