Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: RE: table format question


From   "David Harrison" <[email protected]>
To   <[email protected]>
Subject   st: RE: table format question
Date   Fri, 1 Jul 2005 15:07:10 +0100

You can get the transpose of this using -table-

table var1, c(mean var2 mean var3 mean var4 mean var5)

-----Original Message-----
From: Alexandra de Montrichard [mailto:[email protected]]
Sent: 01 July 2005 15:01
To: [email protected]
Subject: st: table format question


This may be a basic question but I've searched my stata manuals and
various web resources and can't seem to find an answer. Can anyone help
with this table format question:

I need to produce a cross tab table that includes several different
variables in the rows. Var1 is a catergorical variable with three values
and var2,  var3,  var4, and var5 are yes/no variables with values of 0
or 1. I would like the table to give me row percentages and look more or
less like this:

            var1=A    var1=B    var1=C
var2        .05          .10        .85
var3        .20           .20        .60
var4        .30           .40        .30
var5        .40            .50        .10

Right now I have to run each var2, var3, var4, var5 as an indvidual
cross tab with var1 (tab var1 var2 and then tab var1 var3 etc..) and
then cut & paste the results into one table. Is there a way to get stata
to do that work for me?

Thanks.
Alexandra         


*
*   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/



*
*   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–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index