I am looking for a way to estimate the number of observations needed for a regression analysis. My hypothesised model is
y_post ~ y_pre + x1*x2. My interest lies in whether the interaction term
x1:x2 is statistically significant. I assumed a small-to-medium effect size for this
My question is: assuming a small-to-medium effect size, what is the sample size needed to detect the effect with a power of 80% and alpha 0.05?
After looking into similar questions, I couldn't find a good and systematic reference books for power analysis. Could anyone suggest a good reference book/book chapter on how to conduct a sample size estimation using simulation in R. I want to learn more about simulation because when I encounter different experimental designs in the future, I could simulate the the sample size again by myself.
My background is psychology. It would be wonderful if the references is also from this field (although it is not necessary).
Many similar questions remained unanswered or not satisfactorily (e.g.,Power Analysis By Simulation, How to simulate a custom power analysis of an lm model (using R), Simulating responses from a factorial experiment for power analysis). Your help would be very much appreciated. Thank you.