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

From |
"Monica L. Parra Torrado" <[email protected]> |

To |
<[email protected]> |

Subject |
RE: st: xtabond and 'no observations' |

Date |
Tue, 7 Dec 2004 13:21:47 -0500 |

```
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: [email protected]
[mailto:[email protected]] On Behalf Of jyotsna puri
Sent: Monday, December 06, 2004 7:32 AM
To: [email protected]
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
[Output follows:]
. clear
. use forestall
. tsset id year
panel variable: id, 13010704 to 13241610
time variable: year, 86 to 96, but with gaps
. xtabond sr1tara l(0/1).popn
no observations
r(2000);
. bys year: summ sr1tara popn
----------------------------------------------------------------------------
---
-> year = 86
Variable | Obs Mean Std. Dev. Min Max
-------------+--------------------------------------------------------
sr1tara | 237 145.5053 193.1498 .5 1322.5
popn | 357 597.112 379.3441 96 2779
----------------------------------------------------------------------------
---
-> year = 88
Variable | Obs Mean Std. Dev. Min Max
-------------+--------------------------------------------------------
sr1tara | 364 115.408 250.62 0 2510
popn | 380 593.3526 369.2651 70 2091
----------------------------------------------------------------------------
---
-> year = 90
Variable | Obs Mean Std. Dev. Min Max
-------------+--------------------------------------------------------
sr1tara | 358 124.3645 233.3991 0 1725
popn | 414 569.6667 366.6383 74 2774
----------------------------------------------------------------------------
---
-> year = 92
Variable | Obs Mean Std. Dev. Min Max
-------------+--------------------------------------------------------
sr1tara | 353 136.8555 270.5674 0 2760
popn | 449 554.1626 372.1043 75 2832
----------------------------------------------------------------------------
---
-> year = 94
Variable | Obs Mean Std. Dev. Min Max
-------------+--------------------------------------------------------
sr1tara | 231 172.131 249.4894 1 1729
popn | 472 567.5742 372.0968 63 2897
----------------------------------------------------------------------------
---
-> year = 96
Variable | Obs Mean Std. Dev. Min Max
-------------+--------------------------------------------------------
sr1tara | 271 157.5424 258.6707 0 2000
popn | 501 544.4032 338.6604 61 2297
Jyotsna (Jo) Puri
[email protected]
Doctoral candidate, University of Maryland at College Park,
Maryland.
*
* 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/
```

**References**:**RE: st: xtabond and 'no observations'***From:*"jyotsna puri" <[email protected]>

- Prev by Date:
**RE: st: streg: why Stata doesn't report LR test ...** - Next by Date:
**st: xtabond and no observations** - Previous by thread:
**RE: st: xtabond and 'no observations'** - Next by thread:
**st: Re: The Case of the Disappearing Command** - Index(es):

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