Statalist


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

Re: st: Panel with minimum observations


From   "Martin Weiss" <[email protected]>
To   [email protected]
Subject   Re: st: Panel with minimum observations
Date   Sun, 15 Mar 2009 20:57:30 +0100

<>

As Nick said, -egen- was not a good idea. -egen- expects a function with arguments in parantheses, while -gen- happily takes an expression, such as "_N"

HTH
Martin
-------- Original-Nachricht --------
> Datum: Sun, 15 Mar 2009 14:51:15 -0500
> Von: Christian Bustamante <[email protected]>
> An: [email protected]
> Betreff: Re: st: Panel with minimum observations

> Hi Joseph
> 
> When I use the -egen- comman Stata prints the following error
> 
> . by nit: egen myN=_N
> unknown egen function _N()
> r(133);
> 
> So I used the -gen- command, and it works how I want to.
> 
> Bests
> 
> On Sun, Mar 15, 2009 at 2:54 AM, Joseph McDonnell <[email protected]>
> wrote:
> > . 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.
> >
> > Cheers
> >
> > Joseph
> >
> > On Sun, Mar 15, 2009 at 3:36 PM, Christian Bustamante <[email protected]>
> wrote:
> >> Hi everybody,
> >>
> >> 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?
> >>
> >> Thanks in advance
> >>
> >> --
> >> 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/

-- 
Martin Weiss
Hackersteigle 3
72076 Tübingen
00497071/793535
00491784597218

Psssst! Schon vom neuen GMX MultiMessenger gehört? Der kann`s mit allen: http://www.gmx.net/de/go/multimessenger01
*
*   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–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index