Bookmark and Share

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: Re: st: how keep row variables even if they are missing


From   Nick Cox <[email protected]>
To   [email protected]
Subject   Re: Re: st: how keep row variables even if they are missing
Date   Tue, 5 Apr 2011 08:18:57 +0100

Daniel is right: -table- may temporarily drop observations after a
-preserve-. Goodness knows how many commands do that silently on your
behalf! But "drop" is still the wrong word because it can be misread
as -drop-. The point of view that the observations are not being shown
is the more important one.

Precision is important. Some users write of modelling commands
dropping collinear variables, when they mean "omitting", or of having
missing values when it turns out that they mean gaps in their data.
Usually the wording can be decoded, but ambiguities can also be
reduced by using the -cmdname- notation and sticking as closely as
possible to Stata's own terminology.

Nick

On Mon, Apr 4, 2011 at 11:13 PM, daniel klein
<[email protected]> wrote:
> I assume the main problem is with -table-, since -concise- (which is
> an option not a command) was mentioned. As Nick already pointed out,
> there does not seem to be an easy solution using -table-. (By the way,
> I guess "drop" is indeed the correct word here, since -table- seems to
> drop (not only omit) missing observations)
>
> However, you may either calculate all desired statistics, save them in
> variables and use -tabdisp- to create the tables "by hand" or  you may
> try an ad-hoc, "dirty" work around, described below.
>
> Warning: I did not extensively test this nor do I recomment changing
> code of .ado files from Stata Corp.
> Make sure to backup your data before trying.
>
> 1. locate -table.ado-
> . which table
>
> 2. get the code and copypaste it into an empty do-file editor
> . type c:/whatever/table.ado
> or
> . doedit c:/whatever/table.ado
>
> 3. Make two changes in the copied file  (do not change the original
> -table.ado- file)
>
> 3.1 change line 2
> "program define table ..."
> to read
> "program define table_new ..."
>
> 3.2 change line 104
> "DropMis `varlist' `by'"
> to read
> "*DropMis `varlist' `by'"
>
> 4. Run the do-file (copy) to create -table_new-
>
> 5. create your tables using -table_new- instead of -table-
>

*
*   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/


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