Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

Re: st: Coefficient of strength of association -- eta


From   Ulrich Kohler <kohler@wz-berlin.de>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: Coefficient of strength of association -- eta
Date   Mon, 2 Feb 2004 08:43:59 +0100

Deborah Garvey wrote:
> 1.  What is the "coefficient of strength of association"?  What exactly
> does eta measure?

Eta^2 is sometimes used as a measurement for a association between continious 
and a categorical variable. It is the same as r^2 from the linear regression 
of the continious variable on dummy-variables of the categorical variable. 
In Stata you can therefore calculate it with -regress-. Another way stems from 
a oneway ANOVA:

. oneway ability nation
. di r(MSS)/(r(MSS) + r(RSS)

I also have a user-written program for this on my computer. It is quite old, 
and I don't know the source, but it works:

program define eta2
        version 4.0
        local exp "opt noprefix"
        local if "opt" 
        local in "opt"
        local varlist "req ex min(2)"
        parse "`*'"
tempname o
quietly oneway `varlist' `if' `in'
scalar `o'=_result(2)/(_result(2)+_result(4))
display in green "Eta. " in ye %4.3f `o'
end


-- 
kohler@wz-berlin.de
+49 (030) 25491-361


*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



© Copyright 1996–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index