Stata FAQ
How can I compute Omega Squared in Stata after an ANOVA?

After you perform an ANOVA, it is useful to be able to report Omega Squared as a measure of the strength of the effect of the independent variable.  Stata does not have a program or option that computes this, but ATS has developed a program called omega2 that you can download and use to compute Omega Squared after running an ANOVA.  You can download the omega2 command by typing findit omega2 (see How can I use the findit command to search for programs and get additional help? for more information about using findit).

Once installed, you can use omega2 after running an ANOVA.  Below, we run an ANOVA where factor b has 4 levels and is highly significant.
anova y b

                           Number of obs =      32     R-squared     =  0.8259
                           Root MSE      = 1.21008     Adj R-squared =  0.8072

                  Source |  Partial SS    df       MS           F     Prob > F
              -----------+----------------------------------------------------
                   Model |      194.50     3  64.8333333      44.28     0.0000
                         |
                       b |      194.50     3  64.8333333      44.28     0.0000
                         |
                Residual |       41.00    28  1.46428571   
              -----------+----------------------------------------------------
                   Total |      235.50    31  7.59677419
We can now run omega2 and we get a value of 0.8023.
omega2

omega squared = 0.8023
Below we run a factorial ANOVA, and factor b is again highly significant.
anova y a b a*b

                           Number of obs =      32     R-squared     =  0.9214
                           Root MSE      = .877971     Adj R-squared =  0.8985

                  Source |  Partial SS    df       MS           F     Prob > F
              -----------+----------------------------------------------------
                   Model |      217.00     7       31.00      40.22     0.0000
                         |
                       a |       3.125     1       3.125       4.05     0.0554
                       b |      194.50     3  64.8333333      84.11     0.0000
                     a*b |      19.375     3  6.45833333       8.38     0.0006
                         |
                Residual |       18.50    24  .770833333   
              -----------+----------------------------------------------------
                   Total |      235.50    31  7.59677419   
When there is more than one factor present, you need to supply omega2 with the SS and df for the effect you wish to compute Omega Squared. Below, we compute Omega Squared for factor b by supplying the SS and df for factor b.
omega2 194.50 3

omega squared = 0.8134

How to cite this page

Report an error on this page or leave a comment

The content of this web site should not be construed as an endorsement of any particular web site, book, or software product by the University of California.