Notice: On March 31, it was **announced** that Statalist is moving from an email list to a **forum**. The old list will shut down on April 23, and its replacement, **statalist.org** is already up and running.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

From |
"David Radwin" <dradwin@mprinc.com> |

To |
<statalist@hsphsun2.harvard.edu> |

Subject |
RE: st: Formatted 3-way tables |

Date |
Tue, 27 Mar 2012 08:04:05 -0700 (PDT) |

Richard, I agree and made the same point some years ago. http://www.stata.com/statalist/archive/2007-07/msg00233.html Functionality has improved somewhat since then with respect to integration with Excel (-export excel- for example), but Stata is still far behind in many ways. David -- David Radwin Research Associate MPR Associates, Inc. 2150 Shattuck Ave., Suite 800 Berkeley, CA 94704 Phone: 510-849-4942 Fax: 510-849-0794 www.mprinc.com > -----Original Message----- > From: owner-statalist@hsphsun2.harvard.edu [mailto:owner- > statalist@hsphsun2.harvard.edu] On Behalf Of Richard Moverare > Sent: Tuesday, March 27, 2012 12:52 AM > To: statalist@hsphsun2.harvard.edu > Subject: Re: st: Formatted 3-way tables > > Eric, David, > > thank you for your replies! Both -tab3way- and -tablecol- seem to be > doing what I want to do. But it seems a bit difficult to use -logout- > in order to get a result that doesn't need further editing. Thanks > also for the information about using loops in -tabout-, I don't > understand how I didn't see that. However, as I understand it, it is > not a solution if you want supercolumns, only when you add more row, > or do I miss something here? > > Anyway, I will make something work by using your suggestions. Still, I > am surprised that Stata, that in my opinion is superior to other > statistical softwares in most aspects, doesn't have some more > elaborate feature for building and exporting tables. In this aspect, > SAS, SPSS and other competitors are much better. > > All the best, > Richard > > 2012/3/26 David Radwin <dradwin@mprinc.com> > > > > Rick, > > > > You might also consider Nick Winter's -tablecol- from SSC in conjunction > > with the suggestions below. > > > > David > > -- > > David Radwin > > Research Associate > > MPR Associates, Inc. > > 2150 Shattuck Ave., Suite 800 > > Berkeley, CA 94704 > > Phone: 510-849-4942 > > Fax: 510-849-0794 > > > > www.mprinc.com > > > > > -----Original Message----- > > > From: owner-statalist@hsphsun2.harvard.edu [mailto:owner- > > > statalist@hsphsun2.harvard.edu] On Behalf Of Eric Booth > > > Sent: Monday, March 26, 2012 7:04 AM > > > To: statalist@hsphsun2.harvard.edu > > > Subject: Re: st: Formatted 3-way tables > > > > > > <> > > > > > > Hi Rick: > > > > > > > > > > But I would like column percentages, a "total" column (i.e. smokes > yes > > > > or no, regardless of race). > > > > > > > > > Take a look at -tab3way- it has the total and percentage options you > > > describe. > > > > > > Also, in terms of exporting these tables (like -tabout- does) you > could > > > also: > > > a) use -contract- to build your tables and then export it using - > > > outsheet- or -export excel- > > > OR > > > b) use -logout- to directly export a -table- or -tab3way- command. > > > > > > (-logout-, -tabout-, and -tab3way- are from SSC) > > > > > > > I have looked in the manual for -tabout- > > > > but I haven't seen any solution there. I understand that I can > > > > generate new variables that give all categories and then use > > > > -tabulate-, but I have to generate a great number of tables so it > > > > isn't a feasible way. > > > > > > You should look into -forvalues- or -foreach- looping because it can > > make > > > the process of creating the combined variable (btw, I suggest using > > -egen- > > > function -group()- for this) and many N-way -tabout- tables very > > > feasible. One way to approach this process is already spelled out on > > > pages 35/37 of Watson's -tabout- guide: > > > http://www.ianwatson.com.au/stata/tabout_tutorial.pdf > > > > > > > > > - Eric > > > > > > __ > > > Eric A. Booth > > > Public Policy Research Institute > > > Texas A&M University > > > ebooth@ppri.tamu.edu > > > Office: +979.845.6754 > > > > > > > > > On Mar 26, 2012, at 3:46 AM, Richard Moverare wrote: > > > > > > > Dear Statalist, > > > > > > > > I guess this could be solved in some neat way, but I haven't found > > > > anysolution. I would like to create 3-way tables that looks > something > > > > like: > > > > > > > > webuse byssin > > > > table workplace smokes race, row > > > > > > > > But I would like column percentages, a "total" column (i.e. smokes > yes > > > > or no, regardless of race). I have looked in the manual for -tabout- > > > > but I haven't seen any solution there. I understand that I can > > > > generate new variables that give all categories and then use > > > > -tabulate-, but I have to generate a great number of tables so it > > > > isn't a feasible way. This is such a basic feature in all other > > > > statistical softwares, so I assume there is some easy solution I > > > > haven't found. Any help would be greatly appreciated. > > > > > > > > All the best, > > > > Rick M. > > > > * > > > > * 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/ > > > > > > > > > * > > > * 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/ > > * > > * 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/ > > * > * 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/ * * 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/

**References**:**st: Formatted 3-way tables***From:*Richard Moverare <richard.moverare@gmail.com>

**Re: st: Formatted 3-way tables***From:*Eric Booth <eric.a.booth@gmail.com>

**RE: st: Formatted 3-way tables***From:*"David Radwin" <dradwin@mprinc.com>

**Re: st: Formatted 3-way tables***From:*Richard Moverare <richard.moverare@gmail.com>

- Prev by Date:
**st: work with larger string length** - Next by Date:
**Re: st: Formatted 3-way tables** - Previous by thread:
**Re: st: Formatted 3-way tables** - Next by thread:
**Re: st: Formatted 3-way tables** - Index(es):