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: RE: RE: Converting unbalanced panel to balanced panel data


From   Muhammad Anees <[email protected]>
To   [email protected]
Subject   Re: st: RE: RE: RE: Converting unbalanced panel to balanced panel data
Date   Wed, 16 Mar 2011 14:04:49 +0500

Dear All

Thank you very much for your suggestion. In real the suggestion of
Bryla and Fernando did the job. My assumption was that when I will get
a balanced panel, the same individuals will be there in each year. My
outcome might be

pid year
1    2007
2    2007
3    2007
1    2008
2    2008
3    2008
1    2009
2    2009
3    2009

And indeed the work of Bryla and Fernando did the job. It was only a
rough idea if balancing a panel affects the results from the same data
which is actually unbalanced. My outcome is somehow insuggestive. So I
think balancing is not necessary (may be here in my case only) for the
xtnbreg, re and xtnbreg, fe modelling. Now that I have same conclusion
for the two types of panel data I might use the unbalanced data. Here
I would ask a question for panel data experts in count data. Can I
scale the SErrors in xtnbreg output with the deviance or pearson
coefficient, so that effects of dispersion is removed?

On 16 March 2011 12:10, Jan Bryla <[email protected]> wrote:
> Naturally, you are quite right Dr. Cox. It was an implicit assumption on my part that this would pose no problem for the poster.
>
> /Jan
>
> -----Original Message-----
> From: [email protected] [mailto:[email protected]] On Behalf Of Nick Cox
> Sent: 15. marts 2011 19:46
> To: '[email protected]'
> Subject: st: RE: RE: Converting unbalanced panel to balanced panel data
>
> Not quite; this won't automatically produce balance in my understanding of that term.
>
> You can have the same number of years in two or more incomplete panels but they could be different years.
>
> Rather, the poster has to say which balance he wants in terms of the trade-off between #panels and #years.
>
> Nick
> [email protected]
>
> Jan Bryla
>
> If you want to drop observations that are not present in all years of your study, generate an indicator for number of observations by pid, such as
>
> Bys pid: gen nyear=[_N]
> Keep if nyear==9
>
> Muhammad Anees
>
> I know I can apply most of the panel data estimations to balanced and
> unbalanced panel dataset. Instead of this I would like you all to help
> me out of this.
>
> I have one very basic question in mind and came to no clue after
> intensive research of the Stata help files and over the internet. I
> have an unbalanced panel dataset and want to make it balanced. I would
> present the xtdes results at the end of my email please bear my my
> question first: How can I keep if all my id is present at all times so
> that I come with atleast balanced panel?
>
> xtdes
>
> pid:  10016848, 10016872, ..., 1.794e+08        n       =       16368
> year:  2001, 2002, ..., 2009                            T       =       9
> Delta(year) = 1 unit
> Span(year)  = 9 periods
> (pid*year uniquely identifies each observation)
>
> Distribution of T_i:   min      5%     25%       50%    75%             95%     max
>                               1        1         2           6   9             9
>           9
>
> Freq.  Percent    Cum.   Pattern
> ---------------------------+-----------
> 5110     31.22   31.22   111111111
> 1450      8.86   40.08   ..1111111
> 1187      7.25   47.33   11.......
> 616      3.76   51.09   1........
> 486      2.97   54.06   ........1
> 423      2.58   56.65   .11111111
> 410      2.50   59.15   ......111
> 382      2.33   61.49   .......11
> 352      2.15   63.64   ..1......
> 5952     36.36  100.00  (other patterns)
> ---------------------------+-----------
> 16368    100.00           XXXXXXXXX
>
>
> *
> *   For searches and help try:
> *   http://www.stata.com/help.cgi?search
> *   http://www.stata.com/support/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/statalist/faq
> *   http://www.ats.ucla.edu/stat/stata/
>



-- 
Muhammad Anees
MSc in Economics
The University of Sheffield
United Kingdom

*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/


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