Statistical Power – How to Draw the Estimated Power Curve of a Test

rstatistical-power

The estimated power of a given test can be reported with a table or with a curve in a plot. I need to compare the power of two permutation tests by simulation and I was wondering how to create a good-looking plot. Suppose that I've estimated the power of the tests using different effect sizes. As a consequence, for each test I have the set of points: $(\delta_1,\hat{power_1}),(\delta_2,\hat{power_2}),….(\delta_k,\hat{power_k})$
How can I interpolate exactly these points to get a smooth curve? Can loess be used? Do I need to use a smoothing spline? What is the usual method?
I'd like to get a result similar to this one:
http://blogs.sas.com/content/iml/files/2013/05/simttest.png
Thank you.

Best Answer

Note that if you're finding power across both effect sizes and across sample sizes you'd have a power surface rather than a power curve.

We've also got estimates of rejection rates from simulation, so rather than interpolation there will be some smoothing of noisy estimates.

The rejection counts at any combination of effect size and sample size will be binomial so we could fit GLMs or GAMs to do the smoothing (though often an adequate fit can be obtained via weighted least squares for example).

For most statistics in common use, as sample size gets large $\sqrt{n}\cdot \delta$ (where $\delta$ is effect size for some power) tends to be nearly constant, which simplifies the task of smoothing in the sample-size direction.

For one-tailed tests, in a number of common cases the normal quantiles of the power is nearly linear in effect size; this suggests fitting a probit link, possibly with natural cubic splines or a locally linear smooth. (In some other situations logistic quantiles might be better approximated by a line, so local linearity in a logit model would be a good choice in such situations.)

For two tailed tests you'll sometimes tend to have near linearity away from the null but it may be nearly quadratic close to effect size 0.

If you have the time to run a lot of simulations at each of a large number of different $n$ and $\delta$ it's less important how you smooth -- sometimes you can just use sample proportions and linear interpolation -- in at least some situations this may be enough.