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: RE: Re: misstable sum
From
Nick Cox <[email protected]>
To
"'[email protected]'" <[email protected]>
Subject
RE: st: RE: Re: misstable sum
Date
Fri, 19 Nov 2010 15:21:09 +0000
OK if that's what you want. Note that the code will crash if string variables are included in the data and assumes that no variable has name longer than 9 characters and that no number to be displayed is >9999.
Nick
[email protected]
A Loumiotis
Thanks Nick.
I wrote the following code for a neater presentation of the different
kind of missings.
foreach var of varlist _all {
qui count if `var'==.a
local m_ `r(N)'
qui count if `var'==.a
local m_a `r(N)'
qui count if `var'==.b
local m_b `r(N)'
di `"`var':"' _col(10)`"`m_'"' _col(15) `"`m_a'"' _col(20)`"`m_b'"'
}
}
On Fri, Nov 19, 2010 at 1:21 PM, Nick Cox <[email protected]> wrote:
> -tab, missing- will show them and distinguish them.
A Loumiotis
> I have a survey dataset with three different types of missing observations:
> a. filtered missings=.
> b. don't know=.a
> c. no answer=.b
>
> I would like to use misstable sum to summarize the missings but
> misstable sum only differentiates between observations with "." and
> greater than ".". Is there any other way that the summary is also
> broken down for ".a" and for ".b"?
>
*
* 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/