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   daniel klein <[email protected]>
To   [email protected]
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–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index