ES.w2: Effect size calculation in the chi-squared test for...

Description Usage Arguments Value Author(s) References See Also Examples

Description

Compute effect size w for a two-way probability table corresponding to the alternative hypothesis in the chi-squared test of association in two-way contingency tables

Usage

1
ES.w2(P)

Arguments

P

A two-way probability table (alternative hypothesis)

Value

The corresponding effect size w

Author(s)

Stephane CHAMPELY

References

Cohen, J. (1988). Statistical power analysis for the behavioral sciences (2nd ed.). Hillsdale,NJ: Lawrence Erlbaum.

See Also

pwr.chisq.test

Examples

1
2
3
4
prob<-matrix(c(0.225,0.125,0.125,0.125,0.16,0.16,0.04,0.04),nrow=2,byrow=TRUE)
prob
ES.w2(prob)
pwr.chisq.test(w=ES.w2(prob),df=(2-1)*(4-1),N=200)

Example output

      [,1]  [,2]  [,3]  [,4]
[1,] 0.225 0.125 0.125 0.125
[2,] 0.160 0.160 0.040 0.040
[1] 0.2558646

     Chi squared power calculation 

              w = 0.2558646
              N = 200
             df = 3
      sig.level = 0.05
          power = 0.8733222

NOTE: N is the number of observations

pwr documentation built on March 17, 2020, 5:11 p.m.