Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
From | Nick Cox <n.j.cox@durham.ac.uk> |
To | "'statalist@hsphsun2.harvard.edu'" <statalist@hsphsun2.harvard.edu> |
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 n.j.cox@durham.ac.uk 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 <n.j.cox@durham.ac.uk> 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/