Statalist


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: st: drop panel observations


From   Christian Bustamante <cdeb77@gmail.com>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: drop panel observations
Date   Fri, 20 Mar 2009 22:06:52 -0500

You're right. There is some missing data for a small number of individuals.
How can I drop the individual with non consecutive data?


On Fri, Mar 20, 2009 at 10:02 PM, Scott Merryman
<scott.merryman@gmail.com> wrote:
> Given that the smallest group size is 1 though all panels have at
> least 4 observations, I would suspect you have non-consecutive
> observations and you are using lags.
>
> "Say exactly what you typed and exactly what Stata typed (or did) in
> response. N.B. exactly!"
>
> <http://www.stata.com/support/faqs/res/statalist.html#stata>
>
> Scott
>
> Note: that should have been -bysort panelvar:  keep if _N>=4-
>
>
> On Fri, Mar 20, 2009 at 9:31 PM, Christian Bustamante <cdeb77@gmail.com> wrote:
>> Hi and thanks for answer.
>> Only one doubt: after dropping the observations and running xtregar,
>> the results says
>>
>> Obs per group: min =         1
>> avg =       4.6
>> max =         9
>>
>> Why obs per group are 1? It shouldn't be 5?
>>
>>
>> On Fri, Mar 20, 2009 at 9:21 PM, Scott Merryman
>> <scott.merryman@gmail.com> wrote:
>>> bysort panelvar:  keep if _N>4
>>>
>>> Scott
>>>
>>> On Fri, Mar 20, 2009 at 8:01 PM, Christian Bustamante <cdeb77@gmail.com> wrote:
>>>> Hi
>>>>
>>>> I'm runing a regression model with a unbalanced panel. I want to drop
>>>> observations of individuals that doesn't have at least observations
>>>> for 4 years. How can I do that?
>>> *
>>> *   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/
>>>
>>
>>
>>
>> --
>> CdeB
>>
>> *
>> *   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/
>



-- 
CdeB

*
*   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–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index