Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down on April 23, and its replacement, statalist.org is already up and running.


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

Re: st: RE: missing cases in aggregation


From   Abu Camara <abucamara@gmail.com>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: RE: missing cases in aggregation
Date   Mon, 3 Oct 2011 17:19:24 +0300

Nick,

Many thanks Nick. Your suggestion works fine.
Abu.

On 3 October 2011 13:55, Nick Cox <n.j.cox@durham.ac.uk> wrote:
> This won't work this way. -missing()- just returns 0 or 1; it will not count missings across observations. You need to construct a variable that includes the counts. -egen- includes various functions that might help.
>
> Nick
> n.j.cox@durham.ac.uk
>
> Abu Camara
>
> I am doing some aggregation on some indicators by region and would
> like to have no aggregation
> for year if 1/3 of cases for particular year are missing. I tried the
> following command but did not
> get what I wanted. Any suggestion /help would be appreciated. Thanks in advance.
>
> ***--command----------.
> table  country  year [aweight=pop1] if year==1980 | year==1990
> |year==2000 | year>=2004 & missing(year)>19, ///
> c(mean ger_pri_tot) format(%9.1f) row
>
>
> *
> *   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/
>



-- 
Best Wishes,

Abu Camara

*
*   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   |   Site index