Example: bankruptcy

Publication quality tables in Stata: a tutorial for the ...

PublicationqualitytablesinStata:atutoria lforthetaboutprogramIan a stata program for producing Publication quality It is more than just a means ofexporting stata results into spreadsheets, word processors, web browsers or compilers like actually a complete table building program. This tutorial is intended to present a completeoverview oftabout, with numerous examples of syntax and the kind of tables produced. You mightlike to flick ahead and skim these examples before reading the more detailed exposition tutorial has been around for a number of years but the current version makes use of colourand shading (to make it more readable) and also presents thetaboutcode in large blocks.

Publication quality tables in Stata: a tutorial for the tabout program IanWatson mail@ianwatson.com.au Introduction taboutisaStataprogramforproducingpublicationqualitytables.1 Itismorethanjustameansof

Tags:

  Quality, Table, Publication, Tutorials, Stata, Publication quality tables in stata

Information

Domain:

Source:

Link to this page:

Please notify us if you found a problem with this document:

Other abuse

Transcription of Publication quality tables in Stata: a tutorial for the ...

1 PublicationqualitytablesinStata:atutoria lforthetaboutprogramIan a stata program for producing Publication quality It is more than just a means ofexporting stata results into spreadsheets, word processors, web browsers or compilers like actually a complete table building program. This tutorial is intended to present a completeoverview oftabout, with numerous examples of syntax and the kind of tables produced. You mightlike to flick ahead and skim these examples before reading the more detailed exposition tutorial has been around for a number of years but the current version makes use of colourand shading (to make it more readable) and also presents thetaboutcode in large blocks.

2 Previouslysome of the preparatory stata code, such as recoding variables, was only shown at the beginning ofa set of tables . This meant that a user who just wanted to try out one particular table might havefound that their results did not match the examples in this tutorial . At the risk of tedious repetitionfor those dedicated enough to begin at the beginning, the tutorial is now organised so that eachexample of code is self contained . The reader can now run any one of the examples in isolationand be guaranteed that the results should match what they see in this tutorial . All of the exampleshave sub-headings, so that readers can see at a glance what the particular example is , all of the examples are available in stata do files which are installed whentaboutis installedfrom the SSC archives.

3 The all the code for tab-delimited output (thedefault) and the the code for LATEX say a user s results should match the examples in this tutorial , but I should add a caveat. Ioften get emails fromtaboutusers who don t get exactly the same presentation quality which theysee in this tutorial . This is due to the fact that this tutorial uses LATEX and makes use of the LATEX facilities built in totaboutto optimise LATEX code. These users are often exporting their resultsto MS Excel or MS Word and do not appreciate that LATEXis a totally distinct universe and requireslearning a new system for managing stata output. I discuss LATEX more fully in the following pages,but would stress here thattabouthas many advantages for stata users who are content to work inExcel or Word.

4 In particular, it can automate many of the more tedious aspects of table dispensed with the housekeeping, it s now time to explain whattaboutactually essence,taboutallows a novice stata user to produce multiple panels of cross-tabulations, andto lay out the data in a number of different ways. The output can be oneway or twoway tables offrequencies and/or percentages, as well as summary statistics (means medians etc). Standard errorsand/or confidence intervals, based on stata ssvycommands, can also be included. Furthermore,1 Current version 5 January 2015; tutorial version 5 January 5 January20151a number of statistics (chi2, Gamma, Cramer s V, Kendall s tau) can be placed at the bottom ofeach panel.

5 Finally, formatting of cell contents is simple, and allows users to choose the numberof decimal places, and to insert percentage symbols and currency symbols. Before looking moreclosely at some of the features available intabout, it is worth outlining briefly the design principlesbehind the a minimum, Publication qualitytables should be bothinformativeandaesthetically pleas-ing. In his discussion of what makes for graphical excellence, Edward Tufte (2001) listed severalimportant aspects of data presentation including the many numbers in a small space; the eye to compare different pieces of Tufte had graphs in mind, the same advice helps define what is meant by informative when it comes to tables .

6 In the case oftabout, multiple panels play this role. As will become evidentlater, repeating vertical panels allow for the succinct presentation of a considerable amount of , comparisons between populations and sub-populations within the one table are alsoeasily achieved s book also canvassed aesthetics, though some critics might argue that his minimalist ap-proach to many of the classic statistical graphs has gone too far. Nevertheless, his core idea of max-imising the data component, and minimising the decorative junk, makes for a lot of sense when itcomes to table design. It coincides with the sentiments of Simon Fear, the author of the LATEX pack-age,booktabs(2003).

7 With respect to the use of lines (called rules in LATEX), Fear advocated thatone should never, ever use vertical rules , and, more controversially, one should never use doublerules . These principles or at least the first one are commonly followed in the tables presented inacademic journals, and routinely violated in the business-type tables produced by refinements suggested by Fear (and implemented in hisbooktabspackage) include:increasing the thickness of rules at the top and bottom of tables compared with the lines used forthe mid-rules; and using a small but discernible amount of additional spacing above and belowrules. Anyone who has tried to implement these principles inside a word processor knows howtedious this task is, making LATEX the obvious choice for achieving aesthetic goals such as the case oftabout, the aesthetics largely come through exporting the output as a LATEX docu-ment and making use of a number oftaboutoptions.

8 These include variable rule thicknesses andspacings, rules which span a set number of columns, and the rotation of value labels in the tableheaders to achieve an economical layout which avoids the ugliness of hyphenation. An additionaladvantage in using LATEX withtaboutis the ease with which it allows for the batch production oftables, particularly large numbers of routine tables (as often occurs in an appendix).For stata users contemplating leaving their word processors behind and trying out LATEX, thereare a large number of tutorials and other free materials available on the web. Two books whichhave been a staple in my library for many years are Goossens, Mittelbach and Samarin (1994) andKopka and Daly (1999), both of which have been recently my bias towards LATEX,taboutalso provides many advantages to those stata users whoimport their descriptive tables into spreadsheets or word processors, or require html output.

9 Aswill be evident below, these users can also gain great efficiencies in usingtabout, since very littlefurther processing of the cell entries is required once the appropriate options have been turned of user-friendliness underlie both the design and the syntax oftabout. Whiletaboutaims to offer considerable customisation and flexibility to the end user, it tries to do this withoutbecoming overly complex. It stays close to stata principles, and also implements a number of con-sistent requirements in its syntax. There is a preference for single terms as options, either as a 5 January2015(simply turning onsvy, for example to achieve survey results) or as a switch with a single value (suchas thelayoutoption).

10 Taboutavoids options within options, with the consequent need for numer-ous balanced parentheses. Instead, using two or three separate switches (where needed), each witha single value, is the preferred approach. Thenoption, for example, which provides sample countsin a table has five siblings: annpos(the position), annlab(the label), annwt(the weight), annnocto suppress the display of commas and annoffsetto control placement of n for the incomplete entry of values, and makes up the additional values by repeating thelast value entered (for example, with formats or labels). Finally,taboutalso tries to capture mostsyntax errors at the outset and to provide a simple explanation.


Related search queries