Announcement

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

  • #16
    Hi David. Re #15, as this note on the Wolfram website says, "The Bonferroni correction is a multiple-comparison correction used when several dependent or independent statistical tests are being performed simultaneously" (emphasis added).

    Cheers,
    Bruce
    --
    Bruce Weaver
    Email: [email protected]
    Web: http://sites.google.com/a/lakeheadu.ca/bweaver/
    Version: Stata/MP 18.0 (Windows)

    Comment


    • #17
      Thanks a lot Bruce!

      Comment


      • #18
        Originally posted by Marcos Almeida View Post
        I fully agree with the risks of post hoc testing, particularly without coping with familywise error.

        Among users of other statistical packages (such as SPSS), I gather chi-square residuals is in much more common parlance, so to speak.

        As far as I'm concerned, though, it seems Stata doesn't provide automatically the residuals issued from a chi-square test.

        However, the user-written SSC tabchi (by Nick Cox) can precisely do that, as Nick pointed out in #2.

        Below, a toy example:

        Code:
        . sysuse auto
        (1978 Automobile Data)
        
        . gen myrep = rep78
        (5 missing values generated)
        
        . replace myrep = 1 if myrep <3
        (8 real changes made)
        
        . tab myrep
        
        myrep | Freq. Percent Cum.
        ------------+-----------------------------------
        1 | 10 14.49 14.49
        3 | 30 43.48 57.97
        4 | 18 26.09 84.06
        5 | 11 15.94 100.00
        ------------+-----------------------------------
        Total | 69 100.00
        
        . tab myrep foreign, exp chi2
        
        +--------------------+
        | Key |
        |--------------------|
        | frequency |
        | expected frequency |
        +--------------------+
        
        | Car type
        myrep | Domestic Foreign | Total
        -----------+----------------------+----------
        1 | 10 0 | 10
        | 7.0 3.0 | 10.0
        -----------+----------------------+----------
        3 | 27 3 | 30
        | 20.9 9.1 | 30.0
        -----------+----------------------+----------
        4 | 9 9 | 18
        | 12.5 5.5 | 18.0
        -----------+----------------------+----------
        5 | 2 9 | 11
        | 7.7 3.3 | 11.0
        -----------+----------------------+----------
        Total | 48 21 | 69
        | 48.0 21.0 | 69.0
        
        Pearson chi2(3) = 27.2640 Pr = 0.000
        
        . tabchi myrep foreign, a
        
        observed frequency
        expected frequency
        adjusted residual
        
        ------------------------------
        | Car type
        myrep | Domestic Foreign
        ----------+-------------------
        1 | 10 0
        | 6.957 3.043
        | 2.262 -2.262
        |
        3 | 27 3
        | 20.870 9.130
        | 3.236 -3.236
        |
        4 | 9 9
        | 12.522 5.478
        | -2.098 2.098
        |
        5 | 2 9
        | 7.652 3.348
        | -4.040 4.040
        ------------------------------
        
        
        2 cells with expected frequency < 5
        
        Pearson chi2(3) = 27.2640 Pr = 0.000
        likelihood-ratio chi2(3) = 29.9121 Pr = 0.000
        In general, absolute residuals beyond 3 are considered somewhat "implicated" in the statistical difference. Depending on the data, even beyond 2.

        Hopefully that helps
        Dear Prof. Marcos Almeida ,

        You said that "In general, absolute residuals beyond 3 are considered somewhat "implicated" in the statistical difference. " Do you mean that , for the variable myrep, if myrep=5 , there is a statistics difference between domestic and foreign car. Because you mentioned that absolute residuals > 3.

        Looking forward to your reply.


        Best regard !



        Comment


        • #19
          Wang Weiping In the example provided in #5, we observe that myrep 3 and myrep 5 present absolute residuals beyond 3, hence both are strongly "implicated" with regards to the statistical difference.
          Best regards,

          Marcos

          Comment

          Working...
          X