Statalist The Stata Listserver


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

Re: st: deleting observations


From   menale kassie <[email protected]>
To   [email protected]
Subject   Re: st: deleting observations
Date   Tue, 12 Sep 2006 07:30:54 -0700 (PDT)

Dear All,

Once more I would like to get your help on deleting
observations. When I run equation 1 below after the
command (bys hhn: drop if _N==1) the minimum number of
observation per group (household (hhn) is two.

However, When I run equation 2 below for the
sub-sample of observations using indicator variable
(sterrace ==1) after the command (bys hhn: drop if
_N==1) the minimum number of observation per group is
one. I was expecting th minimum observation per group
to be more than one. I am not clear why this is
happening. I appreciate any help on this.

1) xtreg lnprovalue sex lnfamysize lnage tlu  educ
lnareahh,  i(hhn) fe
Number of obs      =      1279
Number of groups   =       355
Obs per group: min =         2
                avg =       3.6
                max =        11

2) xtreg lnprovalue sex lnfamysize lnage tlu educ
lnareahh if sterrace ==1, i(hhn) fe

Number of obs      =       225
Number of groups   =       150
Obs per group: min =         1
                avg =       1.5
                max =         4

Regards
Menale


--- Maarten buis <[email protected]> wrote:

> bys HHLDid: drop if _N==1
>
> --- menale kassie <[email protected]> wrote:
>> I would
>> like to delete those households who have one plot
> from
>> the list of observations. Below is the data
>> structure.
>>
>> HHLDid  Plot
>> 1	1
>> 1	2
>> 1       3
>> 2       1
>> 2       2
>> 3       1
>> etc
>
>
>
>
> -----------------------------------------
> Maarten L. Buis
> Department of Social Research Methodology
> Vrije Universiteit Amsterdam
> Boelelaan 1081
> 1081 HV Amsterdam
> The Netherlands
>
> visiting adress:
> Buitenveldertselaan 3 (Metropolitan), room Z434
>
> +31 20 5986715
>
> http://home.fsw.vu.nl/m.buis/
> -----------------------------------------
>
>
>
>
>
>
___________________________________________________________
>
> All new Yahoo! Mail "The new Interface is stunning
> in its simplicity and ease of use." - PC Magazine
> http://uk.docs.yahoo.com/nowyoucan.html
> *
> *   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/
>


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
*
*   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/



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