# Sample size calculation, linear regression

I have just had my viva and my sample size calculation was criticised as it was based on r2. I was told to base the sample size on the minimal magnitude of association. My outcome variable is HbA1c, a marker of blood glucose. The minimal magnitude of association is 6 mmol/mol. I am reporting unstandardised b. I have used mixed effects multi level models and have 15 covariates.

I am ok with accounting for clustering once i have a sample size but was wondering how i calculate the sample size? I think that i am getting confused with effect sizes.....Where would i enter my value thats considered of clinical importance? Or does this translate to the effect size? I am using GPower.

Any help would be greatly appreciated. Thank you!

You did not state your goal. If the goal is estimation or prediction it is not appropriate to use a "difference to detect" but rather to solve for $$N$$ that will result in adequate estimation of the expected value of $$Y$$ given $$X$$, i.e., the regression equation. Another good approach is to solve for $$N$$ such that you can estimate $$R^2$$ with a good margin of error. I discuss a few approaches in https://hbiostat.org/rms including a simple calculation based on estimating $$\sigma^2$$ (this usually takes about $$N=70$$ or greater).