Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down at the end of May, and its replacement, statalist.org is already up and running.


[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   daniel klein <klein.daniel.81@googlemail.com>
To   statalist@hsphsun2.harvard.edu
Subject   Re: Re: st: how keep row variables even if they are missing
Date   Tue, 5 Apr 2011 00:13:51 +0200

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-

Best
Daniel
*
*   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–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index