Statalist


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

Re: st: Exporting simple counts from 3-way table


From   David Airey <david.airey@Vanderbilt.Edu>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: Exporting simple counts from 3-way table
Date   Thu, 16 Apr 2009 07:43:40 -0500

There are a number of table solutions on SSC, although some of them are for 2way problems.

see for example:

xml_tab
tabletutorial
dataout

etc.


On Apr 15, 2009, at 6:32 PM, Rob James wrote:

I am trying to genereate counts from a 3-way cross-classification of
variables into CSV, and eventually into EXCEL. I have many such 3 way
tables to make, with two variables (B (2 levels) and C (4 levels)) being
constant across a large set of variables (A) which represent the third
dimension. Of course, for any particular value of A, any particular
cross-classification with B & C may have a count of 0.

STATA clearly generates nice 3D tables on screen using the TABLE
command, and I have worked with the REPLACE option, but I am struggling
to find a way to produce
a dataset  out of STATA that I can readily and quickly.  For example,
the TABLE, replace option does not generate row  when the
cross-classification yields 0 observations, making it very difficult to cut and paste sections of data out of table, replace and put them into
the spreadhseet. TABLE, replace, also has a disconcerting habit of
switching the order of variables across various A values, further making
this messy and error-prone work.

I'd welcome any ideas. This must be very straight foward.

Thanks,

ROb



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



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