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

RE: st: Copy table--how to consistently get correct tab stops

From   David Radwin <>
Subject   RE: st: Copy table--how to consistently get correct tab stops
Date   Fri, 6 Jul 2007 11:06:15 -0700

I respectfully disagree with Tim on SPSS v. Stata on this matter. I used to use SPSS a good deal and still do occasionally, and while Stata is superior in almost every way, in my opinion SPSS is better able to create tables that are simple to copy and paste into Excel or Word for further formatting.

While Tim's technique of inserting text like "zzz" or converting paragraph marks to tabs might work to copy Stata tables, it still requires extra steps in Word or Excel that are not necessary with SPSS. To demonstrate what I mean, below are links to two files containing the crosstabulation of mpg by rep78 that I used as an example earlier. In each file, the first table was pasted from Stata 9.2 and the second was pasted from SPSS 11.0. The key difference is that in both Excel and Word, the SPSS table pasted correctly with no additional formatting while the Stata table incorrectly added an extra column. The SPSS table also has the nice feature of not breaking up the headings into two lines.

In my line of work (university administration), Excel and Word are the standard for creating and sharing data analysis (although these analyses are often converted to Powerpoint or PDF for the latter purpose). Pasting tables quickly, efficiently, and accurately into these programs is far more important than, say, providing correct standard errors for multinomial logit for a survey with multistage sampling.

In fact, copying tables is the main issue that prevents me from universally recommending Stata to my colleagues (as opposed to SPSS, SAS, or nothing at all). I wish this were possible from the standard -tabulate- commands, because most of my colleagues are not interested in learning -display- or -tabout- to get a properly formatted table into Word or Excel when they could do so more easily in SPSS.


At 9:47 AM +0100 7/6/07, Mak, Timothy wrote:

I don't use SAS so I cannot comment on SAS, but I have to say Stata is
far far more flexible in its output of nicely formatted tables than SPSS
can ever be. I don't use the Copy Table function, but what I do is I use
the -display- function to get the stats in exactly the format I want. Ok
I don't know how to generate a 'tab' in Stata, but instead of tab, I can
generate a funny piece of string, say "zzz" or something, and use copy
text in Stata to paste the whole thing in Word. Use Find/Replace to
change all the "zzz" to tabs, then use Convert text to table in Word.
Voila. Done! No need to fix up decimal places, change the order of the
stats, etc. Output is always consistent as long as you type your
-display- function the same way. Down side is, of course you need to
learn to write the -display- command, but the time saved will soon make
it worthwhile.


PS An even quicker way is to use paragraph marks instead of tabs, and
then just use Convert text to table in Word, and adjust the number of

David Radwin, Principal Analyst //
Office of Student Research, University of California, Berkeley
*   For searches and help try:

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