Statalist


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

Re: st: new problem with table display


From   "Jennifer S. Earl" <jearl@soc.ucsb.edu>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: new problem with table display
Date   Wed, 31 Oct 2007 07:36:40 -0700

Thanks Maarten and Richard for your suggestions. I have verified that I am using doubles and the numbers I am using are case identifiers so every digit is meaningful.

I tried bigtab and it will produce the tables, but with a couple of problems, which may be unavoidable, but I thought I would email the list again to see if anyone had suggestions. The program I am running the tables in is a data cleaning programming that flags bad values so that the project team can review those cases. So, each error is set to 0 when it is generated, and then replaced with the case's id number when the error is present. So, if you run a tab of the error, you get the number of unproblematic cases as the frequencies of 0s and the id numbers of the bad cases.

Since I have a lot of errors to look for, I generate the tables at the end of the do file in a group, as in:

* prints out the frequencies for each type of error *
forvalues i = 1(1)9 {
tab tac_err00`i' if sum(tac_err00`i')>0 & tac_err00`i'>0
}

forvalues i = 10(1)99 {
tab tac_err0`i' if sum(tac_err0`i')>0 & tac_err0`i'>0
}

However, bigtab won't display the variable label, as tab does, in the table header, forcing me to produce a separate error codebook for my cleaners versus allowing them to see the variable label with the table.

And, bigtab stops if there are no observations (i.e., no errors for that error variable) whereas tab just prints "no observations" and moves on. I tried putting capture in front of the bigtab command, but that oddly resulted in no output whatsoever, even when there were known errors that should have printed. So, I end up not being able to condition the tables, and hence have a bunch of tables I don't need, from the following commands:

forvalues i = 1(1)9 {
bigtab tac_err00`i'
}

forvalues i = 10(1)99 {
bigtab tac_err0`i'
}

So, if anyone has any ideas about how to work-around these two issues--displaying the variable labels anyway (not the individual value labels, of which there are none) and producing bigtabs only when I want, I would appreciate it.

Thanks again.

Best,

Jenn


*********************************
Jennifer Earl
Director, Center for Information Technology and Society
Associate Professor of Sociology
University of California, Santa Barbara
Santa Barbara, CA 93106-9430

P: (805) 893-7471
F: (805) 893-3324
*********************************
*
* 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/




© Copyright 1996–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index