How to Bootstrap the Power in a Regression Hypothesis test

I am running a regression $Y=\beta X$ having several covariates, and my hypotheses are:

$H_0$: $$\beta_1 = 0$$ $H_a$: $$\beta_1 \neq 0$$

I want to use the bootstrap to compute the power of the test $P_{H_1}(\text{reject } H_0)$, and also to find the effect size of the study.

I think the effect size should be easy - I can just bootstrap the regression (either by sampling residuals or pairs) $B$ times, each time calculating the $\beta_1$ coefficient, and then divide by the SE of the $B$ trials.

I don't see how to compute the power of the test using bootstrap, though. If we sample from the observations, aren't we assuming the null hypothesis? (so we could calculate the p-value, but not the power). How does one use bootstrap to calculate the power of this regression test?

• Welcome to our site. Could you tell us what you are bootstrapping? Ordinarily, power is computed only before obtaining data, so what exactly are you using to drive the bootstrap? And could you explain why you have a need to bootstrap the effect size? If you are performing the regression with standard techniques, such as OLS or logistic regression, there are simpler and more direct ways to obtain it. – whuber Sep 20 '18 at 2:34