# Minimum Sample size for multiple linear regression

#### obh

##### Active Member
Hi,

I tried to calculate the minimum sample size for multiple linear regression.

I tried to check the sample size for predictors=4, effect size f=0.2/d=0.2, sig.level =0.05, power=0.8

1. When I checked the power of the entire model (F power) n=304
2. When I checked the power of one coefficient (t power) n=198
2. When I checked the power of one coefficient with Bonferroni correction(t power) n=281 (sig.level =0.05/4)

I probably doing something wrong as I get a smaller sample size when evaluating each coefficient??? (R code below)

You may say regression effect size f and t-test d are not the same. so Low effect is d=0.2 and f=0.14 get even larger sample size with F power.

Thanks

----------------------------------------------------------------------------------------------------------------

Per Green, if you check only for R squared, say the entire model is significant: n=50 + 8*predictors.
and if you try to evaluate the coefficients: n=104+predictors

Code:
> pwr.f2.test(u =4, v=(304-4-1), f2=0.04, sig.level =0.05)

Multiple regression power calculation

u = 4
v = 299
f2 = 0.04
sig.level = 0.05
power = 0.8012571

> pwr.t.test(power=0.8, d = 0.2 , sig.level = 0.05 ,alternative="two.sided" , type = "one.sample")

One-sample t test power calculation

n = 198.1508
d = 0.2
sig.level = 0.05
power = 0.8
alternative = two.sided

> pwr.t.test(power=0.8, d = 0.2 , sig.level = 0.05/4 ,alternative="two.sided" , type = "one.sample")

One-sample t test power calculation

n = 281.903
d = 0.2
sig.level = 0.0125
power = 0.8
alternative = two.sided

==============================

> pwr.f2.test(u =4, v=(614-4-1), f2=0.14^2, sig.level =0.05)

Multiple regression power calculation

u = 4
v = 609
f2 = 0.0196
sig.level = 0.05
power = 0.8002173

#### hlsmith

##### Not a robit
I don't get a lot of linear reg, so I am not to up on this. What is with the one-sample t-test, is that for a continuous and/or proportion test not equal to null of zero? Also, why do you think you need a Bonferroni correction?

#### obh

##### Active Member
What is with the one-sample t-test, is that for a continuous and/or proportion test not equal to null of zero? Also, why do you think you need a Bonferroni correction?
The one sample t-test checking the H0 that the coefficient equal to zero.

If you know the model, you probably interested only on the F test for he entire model.

If you are not sure what IVs to keep in the model then you have in the edge case t-tests as the number of IVs, so multiple tests.
So the solution should be between no correction and Bonferroni correction, but even with Bonferroni correction the sample size ls smaller than for the entire model?

#### hlsmith

##### Not a robit
Given I am not thinking too hard about this. what does the nu stand for in the first equation. Is a difference partially associated with the potential degrees of freedom beside that they are looking at different tests.

Last edited: