Statistical Power – Effect size
In order to calculate power, it is necessary to calculate the effective sample size or "effect size" which is generally categorized as small, medium, or large.
In other words you need know how big the effect is expected to be. This you have to do by examining your data.
If the effect is small, more samples are needed to achieve the usually acceptable power level of at least 80%.
The effect size associated with your data, is dependent on the type of test that is involved in analyzing the sample - ANOVA, Student's t-test, proportions, chisq (and also, when two tests are being compared, if the samples being analyzed are even or uneven). Once this is known, then the effect size can be calculated.
Given the effect size the numbers of samples you have can be used to see what the power level of your data is. It is also possible to state the power level that you would like to have and compute the number of samples that you would need to achieve this power level.
In R, the package to obtain effect size and power is “pwr”.
Transcript
So, to calculate the power, what we need to do is compute the effective sample size or the so-called "effect size". And generally, we split effect sizes into one of three values. Maybe we expect a small effect size or medium or large effect size. And we need some experience; we need some data to be able to decide how big an effect we expect. So if the expected difference is very small, we need a lot of samples. Typically, we will try to get a power level of at least 80%. So: Can we can compute it?
Well, it turns out the effect size is associated with our data, it's dependent on the type of test that we're going to use, whether we are going to use analysis of variance (ANOVA), Student's t-test, proportion, chi-square, or whatever the test is. But once we know it, we can now calculate the effect size. The effect size is going to tell us how many samples we actually have to take to see with the power level of our data is.