Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down at the end of May, and its replacement, statalist.org is already up and running.


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

Re: st: Cross Tabulation with more than 2 variables


From   Nick Cox <njcoxstata@gmail.com>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: Cross Tabulation with more than 2 variables
Date   Mon, 22 Aug 2011 12:55:20 +0100

FAQ     . . . . . . . . . . . . . . . . . . .  Dealing with multiple responses
        . . . . . . . . . . . . . . . . . . . . . . .  N. J. Cox and U. Kohler
        4/05    How do I deal with multiple responses?
                http://www.stata.com/support/faqs/data/multresp.html

SJ-5-1  st0082  . . . . . . . . . . . . . . . Tabulation of multiple responses
        (help _mrsvmat, mrgraph, mrtab if installed)  . . . . . . . .  B. Jann
        Q1/05   SJ 5(1):92--122
        introduces new commands for the computation of one- and
        two-way tables of multiple responses

SJ-3-1  pr0008   Speaking Stata: On structure & shape: the case of mult. resp.
        . . . . . . . . . . . . . . . . . . . . . . . .  N. J. Cox & U. Kohler
        Q1/03   SJ 3(1):81--99                                   (no commands)
        discussion of data manipulations for multiple response data

Nick

On Mon, Aug 22, 2011 at 11:56 AM, Christoph Engel <engel@coll.mpg.de> wrote:

> Maybe I just have not found the right command, or the right keyword. But
> since I frequently encountered the problem, I hope someone might point me to
> a convenient solution. I want to do cross tabulation for more than 2
> variables.
>
> This time, I have summary data about papers that I cannot include in a
> meta-study. There is a list of 10 reasons why I had to exclude them. Some
> papers are excluded for more than one reason. I have dummy coded these
> reasons. I therefore have a dataset of the following form
>
>                    r1    r2    r3    ...    r10
>
> study1        0    1    0    ...        0
> study2        1    0    1               0
> study3        0    0    1               1
>
> I want to generate a table that looks like this
>
>                    r1    r2    r3    ...    r10
> r1                5      0    2            0
> r2                2      4    0            0
> ...
>
> I thus want to say, how often a study had to be excluded for reason 1 alone,
> or because it simultaneously suffered from reason 1 and reason 10 (or any
> other reason).
>
> Is there a good way to do this? In principle, corr needs this information,
> but you do not get sums. tab2 provides the information, but does not collect
> it in one table.

*
*   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   |   Site index