There are several R packages with functionality to calculate effect size. Recently I start to use the package `pwr`

. Taking `pwr.t.test`

for example (within the context of two sample t-test), here it says once sample size, significance level and power are specified, effect size will be determined.

I have two questions:

What kind of the effect size does

`pwr.t.test`

return?As far as I know, Cohen's d is one type of effect size. It is calculated purely by difference of means and standard deviation of the two samples. If

`pwr.t.test`

returns Cohen's d or similar metrics, why do we need to specify power and significance level?

Correct me if I am wrong. Thank you.

**Contents**hide

#### Best Answer

`pwr.t.test`

does not calculate effect size at all, but statistical power. The package is called "pwr" because it is meant for **p**o**w**e**r** analysis. From that package, `cohen.ES`

can compute effect sizes.