Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: st: missing observations in tabulate
From
Nick Cox <[email protected]>
To
"[email protected]" <[email protected]>
Subject
Re: st: missing observations in tabulate
Date
Wed, 12 Jun 2013 16:49:48 +0100
In a recent answer I referred you to -egen-.
egen nonmiss = count(dpc), by(year)
egen number = count(1), by(year)
tabulate .. if nonmiss/number >= 1/3
I presume you mean _2/3 or more_..
If your panel is balanced, you can simplify this using the variable -nonmiss-.
Nick
[email protected]
On 12 June 2013 16:42, Abu Camara <[email protected]> wrote:
> Hi Statalist,
>
> I wrote the following code to do some tabulation. But I want to
> suppress the output
> for any year that has 2/3 of the observations missing.That is if 2/3
> of the countries have observations
> missing for any given year. I am using World Bank WDI database to do
> some regional aggregation.
> What should be the approriate code here?
>
> table country year [aweight=pop], c(mean dpc), if region==2 & oil==1, row
>
> --
> Best Wishes,
> Abu Camara
> *
> * For searches and help try:
> * http://www.stata.com/help.cgi?search
> * http://www.stata.com/support/faqs/resources/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/faqs/resources/statalist-faq/
* http://www.ats.ucla.edu/stat/stata/