Announcement

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

  • Question on oneway anova and pairwise comparison

    Recently, I'm conducting research, we would like to see some difference between different national identity groups. First, I applied One-way ANOVA (oneway) command to test the mean comparison among identity groups. But when I test it with pwmean command, the results changed. Does anyone know the reason and the difference between those two commands?

    oneway polsati newnid5, bonferroni tabulate

    new coded |
    national | Summary of political satisfactory
    identity | Mean Std. Dev. Freq.
    ------------+------------------------------------
    1 | 4 1 198
    2 | 4 1 115
    3 | 4 1 448
    4 | 4 1 50
    5 | 4 1 124
    ------------+------------------------------------
    Total | 4 1 935

    Analysis of Variance
    Source SS df MS F Prob > F
    ------------------------------------------------------------------------
    Between groups 29.9813114 4 7.49532785 8.25 0.0000
    Within groups 844.664678 930 .908241589
    ------------------------------------------------------------------------
    Total 874.645989 934 .936451809

    Bartlett's test for equal variances: chi2(4) = 33.8585 Prob>chi2 = 0.000

    Comparison of political satisfactory by new coded national identity
    (Bonferroni)
    Row Mean-|
    Col Mean | 1 2 3 4
    ---------+--------------------------------------------
    2 | -0
    | 1.000
    |
    3 | -0 -0
    | 0.000 0.219
    |
    4 | -0 -0 -0
    | 0.010 0.202 1.000
    |
    5 | -1 -0 -0 -0
    | 0.000 0.015 0.908 1.000



    Then, I tried pwmean to see the mean comparison, but I got the different answer like below:

    . pwmean polsati, over(newnid5) mcompare(bonferroni) cieffects pveffects effects cimeans

    Pairwise comparisons of means with equal variances

    over : newnid5

    --------------------------------------------------------------
    | Unadjusted
    polsati | Mean Std. Err. [95% Conf. Interval]
    -------------+------------------------------------------------
    newnid5 |
    1 | 4.419192 .067728 4.286275 4.552109
    2 | 4.295652 .0888693 4.121245 4.47006
    3 | 4.066964 .0450258 3.9786 4.155328
    4 | 3.92 .134777 3.655498 4.184502
    5 | 3.903226 .0855835 3.735267 4.071185
    --------------------------------------------------------------

    ---------------------------
    | Number of
    | Comparisons
    -------------+-------------
    newnid5 | 10
    ---------------------------

    -----------------------------------------------------
    | Bonferroni
    polsati | Contrast Std. Err. t P>|t|
    -------------+---------------------------------------
    newnid5 |
    2 vs 1 | -.1235397 .1117355 -1.11 1.000
    3 vs 1 | -.3522276 .081329 -4.33 0.000
    4 vs 1 | -.4991919 .1508374 -3.31 0.010
    5 vs 1 | -.5159661 .1091403 -4.73 0.000
    3 vs 2 | -.2286879 .0996247 -2.30 0.219
    4 vs 2 | -.3756522 .1614391 -2.33 0.202
    5 vs 2 | -.3924264 .1233786 -3.18 0.015
    4 vs 3 | -.1469643 .1420991 -1.03 1.000
    5 vs 3 | -.1637385 .096705 -1.69 0.908
    5 vs 4 | -.0167742 .1596539 -0.11 1.000
    -----------------------------------------------------

    even the mean of each identity groups are different in these two commands. Does anyone know how to deal with it? Thanks!

  • #2
    Pei:
    welcometo this forum.
    If your regressand is continuous, there's nothing that -regress- can't do better than -anova-.
    Then you can use -contrast- to delve into multiple comparison issues.
    As an aside, please read and act on the FAQ to post more effectively and increase your chances of getting helpful replies. Thanks.
    Kind regards,
    Carlo
    (Stata 19.0)

    Comment

    Working...
    X