I am currently writing my thesis and I conducted a OLS-regression with interaction terms to test for heterogenous treatment effects. My dependent variable is continuous and I have 5 independent categorical variables and 4 interaction terms. I know that the sample size I used was too small to draw representative conclusions, however, I still want to check what the minimum required sample size needs to be when alpha = 0.05 and the statistical power = 0.80.
Can someone please help me?
I tried the pwr.f2.test function in R, but I am not sure if this is the correct way. I ran the following code:
result <- pwr.f2.test(u = 9, v = NULL, f2 = 0.18, sig.level = 0.05, power = 0.80)
where u is the number of predictors, f2 = 0.15/(1-0.15), sig.level = 0.05, and power = 0.80. The output of V was 86. Is it correct that the minimum required sample size is therefore 86 + 9 + 1 = 96?