Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Crosstabulation Question: Options row vs. col

    I know this is a really basic question, but the logic confuses me every time I do crosstabs - even within a few weeks of the last time I did it. Can anyone recommend a trick, like a mnemonic device or a pattern, that helps with knowing:

    1) when to use (ex) tab var1 var2, row (instead of tab var1 var2, col)
    2) how to interpret the results (of ex, tab var1 var2, row or tab var1 var2 col)

    I swear I'm not stupid; I just really get my logic inverted when I look at these tables. If anyone has any advice on how to keep track of when to use & how to interpret row vs column crosstabs, it would be a huge help.

    Thank you,

    Tatiana

  • #2
    You look at row percentages if you want to compare within columns and vice versa. Interpretation is easiest to discuss based on an example:

    Code:
    . // open example data
    . sysuse nlsw88, clear
    (NLSW, 1988 extract)
    
    .
    . // prepare the data
    .
    . gen byte marst = !never_married + married if !missing(never_married)
    
    . label variable marst "marital status"
    
    . label define marst 0 "never married"    ///
    >                    1 "widowed/divorced" ///
    >                    2 "married"
    
    . label value marst marst
    
    .
    . gen byte urban = c_city + smsa
    
    . label define urban 2 "central city" ///
    >                    1 "suburban"     ///
    >                    0 "rural"
    
    . label value urban urban
    
    . label variable urban "urbanicity"
    
    .
    . // look at the tables
    .
    . tab marst urban, row nofreq
    
                     |            urbanicity
      marital status |     rural   suburban  central c |     Total
    -----------------+---------------------------------+----------
       never married |     20.51      31.20      48.29 |    100.00
    widowed/divorced |     28.07      36.49      35.44 |    100.00
             married |     31.69      44.73      23.58 |    100.00
    -----------------+---------------------------------+----------
               Total |     29.61      41.23      29.16 |    100.00
    
    . tab marst urban, col nofreq
    
                     |            urbanicity
      marital status |     rural   suburban  central c |     Total
    -----------------+---------------------------------+----------
       never married |      7.22       7.88      17.25 |     10.42
    widowed/divorced |     24.06      22.46      30.84 |     25.38
             married |     68.72      69.65      51.91 |     64.20
    -----------------+---------------------------------+----------
               Total |    100.00     100.00     100.00 |    100.00
    In the first table we asked for row percentages, so we compare within a column: 21% of the never married person live in a rural environment while 32% of the married live in a rural environment

    In the second table we asked for column percentages, so we compare within rows: 7% of the rural people are never married, while 17% of the people in the central city are never married.
    ---------------------------------
    Maarten L. Buis
    University of Konstanz
    Department of history and sociology
    box 40
    78457 Konstanz
    Germany
    http://www.maartenbuis.nl
    ---------------------------------

    Comment

    Working...
    X