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: st: Descriptive statistics table for continuous variables by several subgroups


From   "Bartus Tamás" <[email protected]>
To   [email protected]
Subject   Re: st: Descriptive statistics table for continuous variables by several subgroups
Date   Thu, 13 Mar 2014 22:19:43 +0100

Dear Maire,

I wrote a command called publish some years ago which can create tables which resemble the one you wish to obtain.
Unfortunately, this will be not the ultimate solution....

The publish command must be installed with the stata commands

net from "http://web.uni-corvinus.hu/bartus/stata"
net install publish , replace

I assume that north and south are categories of the variable region, and 2006-2008 are categories of year.
Then you can try the following commands.

egen group = group(year region)
publish open test.tex , replace
publish sum var_1 var_2 var_3 , by(group) scol(2 2 2) sctitle("2006"  "2006"  "2006" Ö
On 14/03/13, Joe Canner <[email protected]> wrote:
Marie,

This is an unfortunate omission from the otherwise very useful -table-, -tabstat-, and -tabout- commands.  There have been several suggested solutions in the past, all of which involve producing a table in the usual way and transposing it, either using Stata matrices (http://www.stata.com/statalist/archive/2006-08/msg00335.html ) or MS Excel (http://www.stata.com/statalist/archive/2005-07/msg00040.html ).  I don't know if there are any more recent suggestions, but I would love to know about them if there are, as what you are trying to do is something that frequently comes up in biomedical research (e.g., list of means for all continuous variables, stratified by treatment group).

Regards,
Joe Canner
Johns Hopkins University School of Medicine



-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Marie-Luise Schmitz
Sent: Thursday, March 13, 2014 3:03 PM
To: [email protected]
Subject: Aw: Re: st: Descriptive statistics table for continuous variables by several subgroups

I studied that document at length and I highly appreciated it. The problem is that it treats only the case where the rowvariable is categorial. I don't see what to do if the rowvariable is continuous. I would like to have the table with the variables defining rows and the groups (years; all north south) defining columns.
Any hint?
 

Gesendet: Donnerstag, 13. März 2014 um 19:38 Uhr
Von: "Michael McCulloch" <[email protected]>
An: "[email protected]" <[email protected]>
Betreff: Re: st: Descriptive statistics table for continuous variables by several subgroups
Marie, the Tabout program can do this, and shows how to implement in LaTex. Ian Watson's tutorial paper is easily located via google.


Best wishes,
Michael McCulloch

--
Pine Street Foundation, since 1989
124 Pine Street | San Anselmo | California | 94960-2674
P: (415) 407-1357 | F: (206) 338-2391 | http://www.PineStreetFoundation.org


> On Mar 13, 2014, at 11:30 AM, "Marie-Luise Schmitz" <[email protected]> wrote:
>
> Dear Stata users,
>
> I want to produce a table of descriptive statistics (mean values) for several continuous variables for different subgroups and years. Basically, I want to obtain a table that looks as follows:
>
> 2006 2007 2008
> variable all north south all north south all north south
> var_1
> var_2
> var_3
> N. obs.
>
> I would like to export this table into Latex afterwards which might further complicate things.
>
> I tried several things using the tabulate command but nothing worked because my rowvariables are not categorial.
> Any help will be highly appreciated.
>
> Marie
>
> *
> * For searches and help try:
> * http://www.stata.com/help.cgi?search[http://www.stata.com/help.cgi?search]
> * http://www.stata.com/support/faqs/resources/statalist-faq/[http://www.stata.com/support/faqs/resources/statalist-faq/]
> * http://www.ats.ucla.edu/stat/stata/[http://www.ats.ucla.edu/stat/stata/]

*
* For searches and help try:
* http://www.stata.com/help.cgi?search[http://www.stata.com/help.cgi?search]
* http://www.stata.com/support/faqs/resources/statalist-faq/[http://www.stata.com/support/faqs/resources/statalist-faq/]
* http://www.ats.ucla.edu/stat/stata/[http://www.ats.ucla.edu/stat/stata/]

*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/faqs/resources/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/faqs/resources/statalist-faq/
*   http://www.ats.ucla.edu/stat/stata/
--

Tamás Bartus, PhD
Associate Professor, Deputy Director
Institute of Sociology and Social Policy
Program Director, Doctoral School of Sociology
Corvinus University, Budapest
1093 Budapest, Közraktár utca 4-6.
Room 424.
Phone: +36-1-482-7301
Fax:     +36-1-482-7348
Homepage: http://web.uni-corvinus.hu/bartus


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index