Thanks for the positive comments.
For those in the dark, -nmissing- (and -npresent-,
really the same program, if you look closely)
were published in STB-49, then STB-60, then
SJ 3-4.
I can see why Ric wants this. I have thoughts
under various heads:
1. Yes, any one can clone the code and modify the
program to do this. It's just that -nmissing- is
my name (unless StataCorp in turn grab it off me,
or grab it off of me, as they might say, being Texan).
2. I don't want to do that myself. It could be done
by an option that a user can easily ignore, but at
the same time my thought is that for what it does
-nmissing- is already a bit more complicated than
I would really like. There is often a small design
issue with commands, especially relatively minor
utilities: ideally each should do one thing, and
that one thing well, and designers should resist
urges to add just one more option. "Creeping featuritis"
is I believe Eric Raymond's term. I wanted -nmissing-
to be minimal in its output: adding scope to
complicate that output is moving in the wrong direction
as far as I am concerned.
3. Nevertheless I have changed -nmissing- so
that the variable list is returned in -r(varlist)-.
This allows users to fire up -describe- afterwards,
etc.
4. If you learn -foreach- the caprice of programmers
and what they will or won't do is not an issue.
Just a minor tweak to some code posted yesterday
in answer to Ric's original question gives
part of an answer:
foreach v of var * {
qui count if mi(`v')
if r(N) >= 80 local badlist "`badlist'`v' "
}
d `badlist'
and something like that can go in a do file or
program.
Nick
[email protected]
Eric Uslaner
> Nick Cox kindly (as always) responded to my query about listing
> variables with a minimum number of cases through npresent and nmissing
> (which he wrote). nmissing and esp. npresent are wonderful.
> But I was
> wondering if there is anyway to hack them to have them place variable
> labels on the RHS in addition to the variable names and
> number of cases
> (as fsum does). Thanks much for any help.
*
* For searches and help try:
* http://www.stata.com/support/faqs/res/findit.html
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/