19  Study Planning

Having learned the entire workflow of a statistical analysis - from question defining, variable operationalization, and model specification to model fitting, inference, and results reporting - one might think this should be the conclusion of this book. Yet, one research study is not the end of the scientific process. It is one stepping stone. Information from past studies shapes our current ideas of data generation processes and hypotheses, and our work hopefully informs even more developments and theoretical refinements.

But our research is not guaranteed to be helpful in this way. So we must be careful to design our studies in such a way they can positively contribute to the scientific literature, and then to interpret the results correctly. In this chapter we will discuss a major factor that influences the quality of population inferences we can make based on data - sample size.

19.1 Statistical power

As we’ve discussed previously, practical and statistical significance are not the same thing. You can’t tell what an effect size is just from a p-value, and you can’t tell whether an effect is significant just by looking at an effect size. But these two things do cooperate for helping us make conclusions from inferences.

Recall in Chapter 16 when we discussed Type I and Type II error. Type I error is the chance that we mistakenly reject the null hypothesis when we shouldn’t. We thought that there’s a non-zero effect, but really there’s nothing there. We choose this chance ourselves, with an \(\alpha\) criterion of e.g. 0.05. \(\alpha = 0.05\) means there is a 95% chance we don’t reject the null when it is true (P(fail to reject | \(H_0\) is true); true negative), and a 5% chance we incorrectly reject the null when it is true (P(reject | \(H_0\) is true); false positive). \(\alpha\) is the Type I error rate - given the null is true, how often do we get a false positive decision?

On the other hand is Type II error. This is the chance that we fail to reject the null hypothesis when we should have. We thought that our data were consistent with the null hypothesis, but really they were produced by a non-zero population value. Like Type I error is controlled by a criterion that we set, Type II also has a criterion \(\beta\) (not to be confused with the population model parameter \(\beta\) … statisticians were running out of letters). When we set the \(\beta\) criterion to something like 0.05, we would have a 5% chance of failing to reject the null hypothesis when we should (P(fail to reject | \(H_0\) is false); false negative). The complement, then, is we have a 95% chance of correctly rejecting the null hypothesis when we should (P(reject | \(H_0\) is false); true positive).

This last concept - the chance of correctly finding an effect that exists in the population - is called statistical power. Statistical power, \(\alpha\), and \(\beta\) are all related, as we can see in this grid:

statistical power = The probability that a study will be able to detect an effect as significant, if the effect exists.
Figure 19.1: All possibilities for the outcome of a research study. However, one can never know which truth column you are in!

For any one study, Type I and Type II error are at odds - lowering the \(\alpha\) criterion to make it harder to get a false positive (rejecting the null when we shouldn’t) will raise the chance of getting a false negative (failing to reject the null when we should).

However, before even running a study, it is possible to keep both \(\alpha\) and \(\beta\) low. This is because statistical power (1-\(\beta\)) is related to both sample size and effect size. A larger sample size makes our estimates more accurate, and easier to find a small effect significant. A larger effect size is easier to find statistically significant. Thus, when we have a large sample size and/or a large effect size to find, our statistical power is high for a pre-determined Type I error rate.

We can verify this through simulation. Figure 19.2 shows a simulated experiment that investigates the difference in means between two groups. This simulation varied the size of the effect (in terms of Cohen’s \(d\)), the Type I error rate, and the overall sample size. This was repeated many times to find the proportion of times that the true effect was correctly identified as significant (statistical power).

Figure 19.2: Simulation results showing how the significance criterion, sample size, and effect size affect statistical power. Horizontal dotted black line indicates the conventional power level of 0.8.

This simulation shows us that for any Type I error rate we choose, we will have more statistical power if our sample size is large and the effect we are looking to estimate is large. Even if the effect size is small, we will have more power to correctly detect it if we use a big sample size and/or a more lenient Type I error rate.

19.1.1 Consequences of power

There are at least two important reasons to care about statistical power. First, generally we can’t control how big an effect is in the population, but we can increase our chance of correctly rejecting a null hypothesis by designing studies with a large sample sizes and high statistical power. If we run a study with low statistical power, it will be what is called underpowered and we have low hope of correctly finding a statistically significant effect, even if it does exist in the population. Underpowered research may only be a waste of resources.

underpowered = The state of a study having too small of a sample size to reliably detect a true effect as significant.

Second, it turns out that any positive findings that come from an underpowered study are more likely to be false compared to a well-powered study. How can this be? Even if we run a study with a small sample size, if we find a significant effect, that would just mean the effect is a large one, right?

It’s counter-intuitive, but when a research literature in general is made up of studies finding positive effects but with low power, the chance that any one published study is a false positive is high. This is because it is harder for true positives to be found, but still possible to find false positives. We can use math to demonstrate this explicitly:

When we open up a research paper reporting an effect, we want to know how likely the results in that study are to be a good reflection of reality - a true positive. We want the positive predictive value of any one research paper to be high:

positive predictive value = the probability that a single published study in a research literature is a true positive.

\[PPV = \frac{P(true positive)}{P(true positive) + P(false positive)}\]

This is the proportion of positive results that are true positives.

In a research field where many hypotheses are being tested, some are real effects and some are null1. There is a probability that any one hypothesis is a true effect (\(P(effect)\)) or null (\(P(null effect)\)). The probability of finding a true positive result is simply the joint probability of \(P(effect)\) multiplied by the statistical power of the study:

\[P(true positive) = P(effect) * (1-\beta)\]

where \(\beta\) is the Type II error rate. The probability of a false positive result is determined by \(P(null effect)\) (aka \(1 - P(effect)\)) and the Type I error rate \(\alpha\);

\[P(false positive) = (1-P(effect)) * \alpha\]

The positive predictive value of any one published study is then:

\[PPV = \frac{P(effect) * (1-\beta)}{P(effect) * (1-\beta) + (1-P(effect)) * \alpha}\]

Let’s say a research field is pushing the boundaries of knowledge, where most hypotheses that are tested are duds (e.g. \(P(effect) = 0.2\); though note that we don’t actually know this number in reality). If the researchers of this field are using a typical Type I error rate of 5% and high power (say, 95% power), we can compute the positive predictive value of any one publication as:

\[PPV = \frac{0.2 * 0.95}{0.2 * 0.95 + (1-0.2) * 0.05} = 0.826\]

This means that any one paper we read that is reporting a positive result has an ~83% chance of being a true positive vs. a false positive.

But now let’s do the same for a research community that doesn’t use good power (say, 15% power):

\[PPV = \frac{0.2 * 0.15}{0.2 * 0.15 + (1-0.2) * 0.05} = 0.429\]

Now, any one published study only has a ~43% chance of being a true positive. There are more false positive publications than true positives (and a very large “file drawer” of true and false negatives that never made it to publication).

This realization came crashing down on psychology in the early 2010’s when the Open Science Foundation published a replication report in which many research teams tried to replicate prior results in the field2. Out of 100 unique effects tested, only 36% of them replicated (produced another significant result in a new data sample). This shocked members of the field and triggered a major crisis of faith, since many of these effects had dozens of earlier papers backing them up. The problem was because most psychology studies were underpowered, and it turns out research groups had been scrapping many experiments that didn’t show a significant result (termed the “file-drawer problem”). This means that, even for the papers that did find a significant effect, the positive predictive value of those papers was low - they were more likely to be false positives than true positives.

19.2 Power planning

A small sample size is thus a one-two punch to a researcher’s efforts. It makes it harder to find an effect that is real in the population, and it also lowers the trustworthiness of results that make it to publication. Even when not hypothesis testing, a small sample makes an effect estimation less precise, impeding efforts to based decisions on it.

But what counts as “small” for a sample size? We live in the real world, so practical details like time and money constrain what we are able to achieve with a research study. Are 30 people in a research study enough? 100?

This is not a straight-forward question to answer. It will depend on all the statistical choices we’ve discussed so far - one’s estimand, research goal, inference goal, significance criterion, etc. But we still need to think carefully about all these details before starting a new research study so that we can actually learn something from it.

19.2.1 Power planning for overall model performance

One way to decide what sample size you should aim for in a research study is to consider what sample size you need to achieve a certain level of statistical power for rejecting a null hypothesis. This process is called power planning.

power planning = Choosing the sample size for a research study based on the level of statistical power it can achieve.

Recall that these four things are related to each other:

  • statistical power
  • sample size
  • Type I error rate
  • effect size

It turns out that if you know three of these pieces, you can compute the fourth. This computation is called a power analysis. It finds, given a certain population effect size and Type I error rate, what power you have to detect that effect as significant. Typically in psychology, we want at least 80% power.

power analysis = the mathematical computation of needed sample size for a specified level of power, Type I error rate, and effect size

For instance, let’s say we are interested in how much variance in a target variable is explained by an experimental manipulation with multiple categories. In this case, our estimand is a statistical model’s \(R^2\) estimate. Also, let’s say we are only interested in knowing of \(\rho^2\) is at least as large as a medium effect, \(\rho^2 = 0.1\). If it is actually smaller than this, we wouldn’t care about it. If it is larger, we want to find our estimate as significant. Based on this information, the significance criterion we plan to use, and the level of power we want, we can figure out what sample size we should collect.

There are many resources in R for doing power analysis like this. We will pick a particular package MBESS because it has power analysis functions built for statistical models like we have been building (as well as precision planning functions, which we will cover next). Within this package is a function designed to do power planning for an \(R^2\) estimate, ss.power.R2(). This function at minimum needs to be given four arguments:

  • Population.R2=: What effect size are you planning for? In this example, we think an effect size of at least \(\rho^2 = 0.1\) is noteworthy, so we will plan for that (alternatively, you could use the argument Cohen.f2= instead with that version of the effect size).
  • p=: How many explanatory variables are in the model you are testing? When our experiment has four groups, dummy-coding that explanatory variable would create 3 \(X\) variables in our statistical model. Thus, we will use 3 for this value.
  • alpha.level=: What significance criterion will you use to determine an effect is significant or not? In this example, that is 0.05.
  • desired.power=: What level of power do you want to achieve? If we follow minimum standards, we want 0.8 for this value.

With that information, here is how to use the function to get our planned sample size:

According to this output, if we had a sample size with N=103 and the true effect in the population was \(\rho^2 = 0.1\), we would find an estimate we deem significant (at the \(\alpha=0.05\) level) 80% of the time.

However, you might not actually like this level of power. After going through the trouble of running 103 people in your research study, even if you were right about what the effect size was in the population, you would only find a statistically significant estimate 80% of the time. That might not be often enough for you. If you wanted to be even more confident you’d find a significant effect given a true population effect size of at least \(\rho^2 = 0.1\), you could increase your power level.

TipExercise

Change the code below to find what sample size you would need to achieve a power level of 0.95 instead.

To achieve higher power in a research study, we need to collect a bigger sample size.

Alternatively, maybe we’re worried the planned effect size \(\rho^2 = 0.1\) is too large compared to what it might be in the population. If we planned for this effect size but the true effect in the population was smaller, such as \(\rho^2 = 0.02\), we wouldn’t get a statistically significant sample estimate very often. So maybe we want to be conservation and plan for this smaller effect size instead. That way even if the true effect in the population is rather small, we’d be able to find it as significant most of the time.

TipExercise

Change the code below to find what sample size you would need to estimate an effect as least as large as \(\rho^2 = 0.02\), with 80% power.

As you might expect, when a real population value is close to the null hypothesis value, many estimates that come from the real value are also plausible to come from the null hypothesis. Figure 19.3 shows this visually, by comparing the sampling distribution of \(R^2\) estimates in N=103 samples coming from \(\rho^2 = 0\) vs. \(\rho^2 = 0.02\). Only an upper slice of the \(\rho^2 = 0.02\) sampling distribution is large enough to be considered significantly outside of the null sampling distribution. The proportion of these real estimate possibilities that would be considered significant is our power (in this case it’s low: ~20%).

Figure 19.3: The sampling distribution of a null effect $ ho^2 = 0$ (blue) vs. an effect of $ ho^2 = 0.02$ (red) when sample size is N=103. The orange highlighted area indicates the proportion of estimates from the $ ho^2 = 0.02$ distribution that would be considered significantly outside the null sampling distribution - i.e. the power.

Since we don’t actually know if \(\rho^2 = 0\) vs. \(\rho^2 = 0.02\) is true, we can’t reject \(\rho^2 = 0\) as a possibility a lot of the time when our sample size is only N=103. To fix that and decrease our standard error, we need a much larger sample size.

Figure 19.4: The sampling distribution of a null effect $ ho^2 = 0$ (blue) vs. an effect of $ ho^2 = 0.02$ (red) when sample size is N=539. The orange highlighted area indicates the proportion of estimates from the $ ho^2 = 0.02$ distribution that would be considered significantly outside the null sampling distribution - i.e. the power.

19.2.2 Power planning for effect of an individual explanatory variable

If your estimand is instead the effect of a single coefficient \(\beta\) in a statistical model, you can also power plan for that to know what sample size you need. The MBESS function for this sort of estimand is ss.power.reg.coef(). Technically, this function is identifying what sample size is needed to identify a significant \(\Delta R^2\) associated with including this explanatory variable. This varies not only depending on the size of \(\beta\), but also how correlated it is with other explanatory variables in the model (and thus how much unique variance it can explain). For this reason, a bit more information is needed to do power planning for this sort of estimand:

  • Rho2.Y_X=: What is the anticipated \(\rho^2_{full}\) effect size of the model with all predictors included?
  • Rho2.Y_X.without.j=: What is the anticipated \(\rho^2_{reduced}\) effect size of the model when just the explanatory variable of interest is excluded?
  • p=: How many explanatory variables are in the full model?
  • alpha.level=: What significance criterion will you use to determine an effect is significant or not?
  • desired.power=: What level of power do you want to achieve for detecting the unique effect of the explanatory variable of interest?

Here is example, where we test what sample size is needed to detect an effect that uniquely explains 5% of the variance in a model with an overall \(\rho^2_{full}\) of 0.1:

Of course, if your statistical model only has one explanatory variable in it, ss.power.R2() (variance explained by the whole model with one variable) and ss.power.reg.coef() (variance uniquely explained by the one variable) should be the same.

19.2.3 Power planning for a sample mean

While it covers a lot of situations, MBESS does not have a function that power plans for simply a population mean - e.g., the \(\beta_0\) coefficient in an empty model or the \(\hat{x} - \mu\) difference tested in a one-sample t-test. This is because there is already a power function in base R for this simple case: power.t.test(). To use this function, you need to give:

  • delta: The difference between the null hypothesis value and the assumed true population mean. If you’re power planning for a standardized effect estimate, this would be your Cohen’s \(d\) value.
  • sd: The standard deviation of the variable being tested. If you’re power planning for a standardized effect estimate, this argument would be sd = 1.
  • sig.level: Your choice of significance criterion.
  • power: Your chosen power level.

Here is an example testing the sample size needed to find that the true mean in a population is 0.6 rather than 0.5, assuming the standard deviation of the population is 0.3:

TipExercise

Change the values in the code below to find the sample size needed to detect a standardized effect of Cohen’s d = 0.4, with 80% power. (Hint: you’ll need to change two numbers.)

19.2.4 Power planning for complicated estimands or data generation processes

The power planning functions we’ve covered can calculate power exactly, because there are known equations for mapping between sample size, effect size, Type I error, and power with these common estimands. However, if you want to hypothesis test more uncommon and complicated estimands (e.g., that one explanatory variable is more important than another: \(\beta_2 - \beta_1\)) or estimands in more complicated statistical models (logistic regression, multilevel models, etc.), these analytic solutions are either extremely complicated to solve or not even known.

When researchers are in these situations, they often turn to simulation to help them power plan rather than pre-written functions. When simulating, you can specify any data generation process you can think of and pass any estimate value into the simulation. Then you run the simulation multiple times at different sample sizes to see how often you can estimate a significant effect in data generated by the simulation.

We won’t cover power planning through simulation in this book, but there are several packages and accompanying reference pages for this approach in R. For instance, here are instructions for using the simglm package, and here is how to use marginaleffects for power planning.

19.3 Choosing an effect size to plan for

As we’ve seen, if we want a sample size that will give us a reasonable chance of finding a statistically significant effect, we need to have an idea of what that effect size is. However, this is challenging when we’re used to thinking only about a null hypothesis we aren’t interested in3. How do we get an idea of what the true effect size is, so that we can power plan for it?

One option is to find what sort of effect size has been found in prior research studies. You might expect your effect size to be similar to theirs; in that case, you can power plan with that sort of effect size in mind. However, this is not likely to be a satisfying option. Other studies were likely conducted in different populations, with different variable operationalizations, with different models of the data generation process. Because of these differences, the effect you are estimating is not likely to be the same effect they were. Additionally, because of the file-drawer problem, the average of published effect sizes may be bigger than the true effect in the population. Another option is to think about your smallest effect size of interest (SESOI). This is the smallest effect size you would find practically significant and thus want to know about. Anything smaller than your SESOI is not meaningfully different than 0 in your opinion. Thus, even if the null hypothesis is technically false (e.g., the true effect is 0.0001 instead of 0), you don’t care unless the real effect size is a certain amount bigger than the null.

smallest effect size of interest (SESOI) = the smallest effect size you would find practically significant; anything smaller is not meaningfully different than 0.

However, this also gets tough when doing a more complicated power analysis like when we cared the effect of one variable in the context of others. In that case we needed to anticipate not only the true unique variance explained by that variable, but also the effect size of a model without it. If you’re struggling to think of reasonable effect sizes to expect for all of these choices, another option is to run a pilot study with a limited sample size and use the effect estimates from that study to inform your power planning for a larger study.

Note

In practice even the pilot study option has its own difficulties. Effect estimates will be imprecise in a small sample size, so it’s possible the effect size you estimate in the pilot will be much bigger than reality. If you use that over-estimated effect for power planning, your main study will be underpowered for the real effect. For this reason it’s good to run several power analyses with different combinations of effect estimates taken from the pilot study confidence intervals, and then going with the bigger sample size option those analyses propose.

19.4 Precision planning

Power planning is gaining ground as standard practice in psychological research in order to combat problems caused by small sample sizes. Yet, power planning is designed to answer questions about what sample size is needed to detect a significant effect. This means power planning is appropriate only when you are doing null hypothesis significance testing. What if you don’t have a pre-existing hypothesis, and your inference goal instead is to simply estimate an effect as precisely as you can? What sample size do you need for this goal?

In this case a “success” is not defined by significance or not, but by being a certain level of confident about what the population value is based on your estimate. In other words, you are aiming to estimate a confidence interval that is at least as narrow as a specified width (whether or not it includes 0). It is still possible to plan for a sample size that will give you a certain amount of estimate precision, since sample size influences that as well. This approach is called precision planning - planning for accuracy in parameter estimation.

precision planning = Choosing the sample size for a research study based on the level of estimate precision it can achieve.

When doing power planning, we were essentially asking how big a sample size needed to be for a sample estimate to be found statistically significant a certain percentage of the time. That percentage is the study’s power level. When doing precision planning, the comparable question is how big a sample size needs to be for an estimated confidence interval to be a certain width or less, a certain percentage of the time. That means to do precision planning, we need to specify an anticipated effect size, what width of confidence interval we are tolerant of, and how often we’d like the estimated confidence interval to be that width or less - called the assurance rate.

assurance rate = When precision planning, how often the width of an estimated confidence interval will equal to or less than a specified width.

19.4.1 Precision planning for overall model performance

MBESS provides us with functions to do precision planning as well. The one to use when your estimand is a model’s \(R^2\) is ss.aipe.R2(). Its arguments are:

  • Population.R2=: The model effect size are you planning for.
  • p=: Number of explanatory variables in the statistical model.
  • width=: The maximum width of the confidence interval we want to achieve. This width is the difference between the lower and upper bounds of the confidence interval.
  • conf.level=: The confidence level of the confidence interval. By default it is 0.95, but change it if you are using a different confidence interval.
  • assurance=: The assurance level of the study; the probability that the confidence interval you estimate will be as wide as width or narrower.

For example, this code finds the sample size required to estimate a confidence interval of [0 0.2] for a point estimate of \(R^2 = 0.1\).

19.4.2 Precision planning for effect of an individual explanatory variable

There are two MBESS functions for precision planning for the effect of an individual explanatory variable - ss.aipe.src() and ss.aipe.rc(). These different function are for whether or not you are planning on estimating a standardized or unstandardized effect size. Power planning gives the same results for either version of an effect because a statistical significance decision does not depend on the units of the variables. However, when precision planning, the units are very relevant for what the confidence interval bounds will be, and thus how wide the interval will be. For this reason, the precision of a standardized vs. unstandardized model coefficient needs to be planned for differently.

To do precision planning for a standardized model estimate, use ss.aipe.src(). The information required for this function is:

  • Rho2.Y_X=: The anticipated \(\rho^2_{full}\) effect size of a model with all predictors included.
  • Rho2.k_X.without.k=: The anticipated \(\rho^2_{reduced}\) effect size of the model when just the explanatory variable of interest is excluded.
  • K=: Number of explanatory variables in the full model.
  • beta.k=: The expected effect estimate for the explanatory variable of interest.
  • width=: The maximum width of the confidence interval we want to achieve. This width is the difference between the lower and upper bounds of the confidence interval.
  • conf.level=: The confidence level of the confidence interval. By default it is 0.95, but change it if you are using a different confidence interval.
  • assurance=: The assurance level of the study; the probability that the confidence interval you estimate will be as wide as width or narrower.

The function for an unstandardized \(\beta\) estimate, ss.aipe.rc(), additionally needs information about the standard deviation of the target variable and the explanatory variable of interest:

  • Rho2.Y_X=: The anticipated \(\rho^2_{full}\) effect size of a model with all predictors included.
  • Rho2.k_X.without.k=: The anticipated \(\rho^2_{reduced}\) effect size of the model when just the explanatory variable of interest is excluded.
  • K=: Number of explanatory variables in the full model.
  • b.k=: The expected effect estimate for the explanatory variable of interest.
  • sigma.Y=: Expected standard deviation of the marginal distribution of the target variable in the population.
  • sigma.X.k=: Expected standard deviation of the explanatory variable of interest in the population.
  • width=: The maximum width of the confidence interval we want to achieve.
  • conf.level=: The confidence level of the confidence interval.
  • assurance=: The assurance level of the study.

As you can imagine, this is another situation where it is difficult to anticipate all the true population values needed to do precision planning accurately for a \(\beta\) estimand - \(\rho^2_{full}\), \(\rho^2_{reduced}\), \(\beta_k\), \(\sigma_Y\), and \(\sigma_{Xk}\). When you are focused on this sort of estimand and your goal is precision of estimation, it may be best to run a pilot study to get starting values for all of these.

19.4.3 Precision planning for a sample mean

Unlike the power planning scenario, MBESS does have a function for precision planning for a sample mean. ss.aipe.sm() finds the necessary sample size to find a standardized mean - i.e., the variable’s mean in raw units divided by the variable’s standard deviation. It simply requires:

  • sm=: Standardized mean that you expect.
  • width=: The maximum allowed width of the confidence interval.
  • conf.level=: The confidence level of the confidence interval.
  • assurance=: The assurance level of the study.

19.5 Choosing a confidence interval to plan for

Choosing what width of confidence interval to plan for is another tricky decision. It involves reasoning about what level of precision is “good enough” for a certain purpose. In other words, you are looking for an interval width where the bottom and top bounds are functionally the same effect size to you - you would make the same decision regardless of where in the interval the true population value was.

For example, say you want to estimate the effect of age on reaction time because you want to be able to predict at what age older drivers should be reassessed with a driving test. In a research study measuring the effect of age on reaction time in a driving simulator, you estimate \(\hat{\beta_0} = 125\) and \(\hat{\beta_1} = 9\) (for every 1 additional year of age, average reaction time increases by 9 milliseconds). If you wanted to set a reassessment limit at the age when the average driver has an 800ms+ reaction time, you’d use this estimate to solve that prediction equation: \(800 = 125 + 9*x\), where \(x\) solves to 75.

Yet, that process assumes your \(\hat{\beta_1}\) estimate is exact. If we instead calculated a confidence interval for that estimate of [6 12], that would mean our age of driving reassessment could be anywhere from \(x = \frac{800-125}{12} = 56.25\) to \(x = \frac{800-125}{11} = 112.5\). If the true effect was 6 vs. 12, we’d make very difference decisions.

Now see what sort of predictions we’d make if our estimated interval was instead [8.8 9.2]: \(x = \frac{800-125}{9.2} = 73.37\) vs. \(x = \frac{800-125}{8.8} = 76.70\). If the true effect was 8.8 vs. 9.2, it wouldn’t matter very much for our decision - either way we’d require people in their mid-70s to start doing driving reassessments. Thus, when designing the driving simulation study, we may want to use precision planning and aim for a confidence interval no wider that 0.4.

That approach requires a great deal of familiarity with your research domain, variables, and what exactly you will use the research results for. If that is not you, another approach may be to look at Cohen’s rules of thumb for various standardized effects:

Effect size small effect medium effect large effect
\(d\) 0.2-0.5 0.5-0.8 0.8+
\(r\) / \(\beta\) 0.1-0.3 0.3-0.5 0.5+
\(R^2\) 0.02-0.10 0.10-0.25 0.25+
\(f^2\) 0.02-0.15 0.15-0.35 0.35+

Then, you could choose a confidence interval width that would keep your estimate within one of these size categories most of the time. E.g., a Cohen’s d confidence interval of [0.5 0.7] has confidence bounds that are both considered medium effects. Thus planning for a standardized effect interval no wider than 0.2 will mean most of the time your small/medium/large effect decision will be right regardless of whether the true population effect is closer to the bottom of the interval vs. the top.

19.6 Planning with resource constraints

Using these approaches - power planning and precision planning - helps us decide what sample size to use for a study to make our estimates informative and useful. Yet, we don’t always have the luxury of choosing our sample size based on whatever a power or precision plan tells us. Very often scientists have limited time (e.g., a graduate student has a graduation deadline), limited funds (e.g., a grant has a funding cap), or limited sample availability (e.g., members of a population of interest are difficult to contact). Other times we are doing secondary analysis on already-collected data, and we cannot add new participants to the sample. In these cases, if a power analysis says a sample size of 500 is needed, that may not be possible to do.

This book has consistently recommended that the research question should guide study planning and analyses. You should know your estimand and hypothesis ahead of time, and the implications of those should dictate what you do. But sometimes other facts of life will constrain your available choices. When this happens, the sample size you collect will be determined not by scientific details, but by practical ones.

Yet, that doesn’t mean you should forget about power and precision. They may not determine your sample size, but you should still be aware of what level of power or precision you can achieve given the sample size you have access to. As we previously discussed, you can calculate necessary sample size from details of power, effect size, and significance criterion. This means, if you already know your sample size, you can calculate what level of power it would offer you. Calculating achievable power to detect a certain effect with a given sample size is called doing a sensitivity analysis.

sensitivity analysis = The mathematical computation of achievable power for a specified sample size, Type I error rate, and effect size.

To do a sensitivity analysis instead of a power analysis with the functions we have learned, we add an argument for sample size information and leave out the argument for power level. For instance, look at the code below using ss.power.R2():

It includes a Specified.N= arugment instead of desired.power=. The result is that if we could only collect 80 subjects for a model with three explanatory variables, and we were interested in detecting an \(R^2\) estimate of 0.1, we’d have ~68% power to do so.

The same change works for the other MBESS functions to turn them into sensitivity analyses.

TipExercise

Change the code below to run a sensitivity analysis finding the achievable power in a study targeting a \(\beta\) estimand with only N=80.

This suggests we have rather disappointing power to detect a significant effect for \(\beta\), if its \(\Delta R^2\) is 0.05. When we have low power to detect a low effect, that means we have a greater risk of committing a Type II error if the effect in the population is really what we thought it was. If our decision about the effect to plan for is reasonable, and we have low power, we should stop and think really hard about whether it is actually worth spending the limited resources we have on this specific study, or if there are other research designs we could run with stronger effects and therefor better power.

19.7 Chapter resources

19.7.1 Learning goals

After reading this chapter, you should be able to:

  • Define statistical power
  • Discuss the consequences that small samples have for inference
  • Conduct a power analysis for \(R^2\), \(\beta\), and \(\mu\) estimands
  • Explain when one would plan for power vs. precision
  • Conduct precision planning for \(R^2\), \(\beta\), and \(\mu\) estimands
  • Conduct a sensitivity analysis for \(R^2\), \(\beta\), and \(\mu\) estimands

19.7.2 New concepts

  • statistical power: The probability that a study will be able to detect an effect as significant, if the effect exists.
  • underpowered: The state of a study having too small of a sample size to reliably detect a true effect as significant.
  • positive predictive value: the probability that a single published study in a research literature is a true positive.
  • power planning: Choosing the sample size for a research study based on the level of statistical power it can achieve.
  • power analysis: the mathematical computation of needed sample size for a specified level of power, Type I error rate, and effect size.
  • smallest effect size of interest (SESOI): the smallest effect size you would find practically significant; anything smaller is not meaningfully different than 0.
  • precision planning: Choosing the sample size for a research study based on the level of estimate precision it can achieve.
  • assurance rate: When precision planning, how often the width of an estimated confidence interval will equal to or less than a specified width.
  • sensitivity analysis: The mathematical computation of achievable power for a specified sample size, Type I error rate, and effect size.

19.7.3 New R functionality


  1. Some people make an argument that it’s essentially impossible that any effect in the world is exactly 0. So with a big enough sample size, everything is significant and a true positive. To avoid that “well actually” crowd, consider a “negative” in this discussion to be an effect size that’s so small and uninteresting it’s practically 0.↩︎

  2. We’ll discuss more about replication next chapter.↩︎

  3. But I thought, in exchange for the limitations, one of the promises of null hypothesis significance testing was that we don’t need to be specific about what we actually believe? Sike, no refunds!↩︎