Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at

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

RE: st: RE: Re: misstable sum

From   Nick Cox <>
To   "''" <>
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. 


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 <> 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:

© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index