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

RE: st: Panel with minimum observations

From   "Nick Cox" <>
To   <>
Subject   RE: st: Panel with minimum observations
Date   Sun, 15 Mar 2009 19:55:53 -0000



for explanation and an even simpler alternative. 


Christian Bustamante

When I use the -egen- comman Stata prints the following error

. by nit: egen myN=_N
unknown egen function _N()

So I used the -gen- command, and it works how I want to.

On Sun, Mar 15, 2009 at 2:54 AM, Joseph McDonnell <>
> . sort myid
> . by myid: egen myN=_N
> . drop if myN<=2
> Of course, dropping is quite a severe step. You might prefer to use
> one of the 'mark' commands or just use the 'if' qualifier.
> On Sun, Mar 15, 2009 at 3:36 PM, Christian Bustamante
<> wrote:
>> I runing a panel data model with a large dataset. The panel is
>> unnbalanced, so there is individuals with one or two observations. I
>> don't want to use this observations in my model, how can I set it?

*   For searches and help try:

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