Announcement

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

  • Creating a table for differences between more than 3 subgroups assessing by chi-square tests

    Hi,

    I am trying to create a table to assess the differences between 3-4 different age groups and whether the age groups are statistically different. I was able to use tab-out when assessing 2 groups, however I am not able to do this when I have 3-4 groups. Is there any way to go about this in stata?




  • #2
    You did not tell us about your data (see FAQ, #12) and hence I don't understand why you want to apply (a) chi-square test(s). In what respect should the age groups differ? Or do you want to test the differences of the age of 3-4 groups? Here an example of testing differences between five groups concerning prices (not the age) of cars (with no significant differences):
    Code:
    . sysuse auto, clear
    (1978 automobile data)
    
    . oneway price rep78, tab sidak
    
         Repair |          Summary of Price
    record 1978 |        Mean   Std. dev.       Freq.
    ------------+------------------------------------
              1 |     4,564.5   522.55191           2
              2 |   5,967.625   3,579.357           8
              3 |   6,429.233    3,525.14          30
              4 |     6,071.5   1,709.608          18
              5 |       5,913   2,615.763          11
    ------------+------------------------------------
          Total |   6,146.043    2,912.44          69
    
                            Analysis of variance
        Source              SS         df      MS            F     Prob > F
    ------------------------------------------------------------------------
    Between groups      8360542.63      4   2090135.66      0.24     0.9174
     Within groups       568436416     64      8881819
    ------------------------------------------------------------------------
        Total            576796959     68   8482308.22
    
    Bartlett's equal-variances test: chi2(4) =  11.4252    Prob>chi2 = 0.022
    
                      Comparison of Price by Repair record 1978
                                       (Sidak)
    Row Mean-|
    Col Mean |          1          2          3          4
    ---------+--------------------------------------------
           2 |    1,403.1
             |      1.000
             |
           3 |    1,864.7    461.608
             |      0.993      1.000
             |
           4 |      1,507    103.875   -357.733
             |      0.999      1.000      1.000
             |
           5 |    1,348.5    -54.625   -516.233     -158.5
             |      1.000      1.000      1.000      1.000

    Comment

    Working...
    X