Statistical Power, Sample Size, and Detectable Effect Calculations

Author

Metin Buluş

Published

September 18, 2026

1 Introduction

Package Logo

To install the package on your computer:

install.packages("pwrss")

To load the installed package into the current R session:

library(pwrss)

The user guide for a function in the package can be accessed in two ways:

help(power.t.student)

or

?power.t.student

You can copy and paste the example code from the user guide and adapt the parameters as needed.

To find minimum required sample size:

power.t.student(d = 0.50,                   # Cohen's d effect size    
                n2 = NULL,                  # << REQUEST sample size
                power = 0.95,               # statistical power
                alpha = 0.05,               # significance level 
                alternative = "two.sided",  # two-sided hypothesis test
                design = "independent")     # independent samples 

To find statistical power:

power.t.student(d = 0.50,                   # Cohen's d effect size    
                n2 = 105,                   # sample size
                power = NULL,               # << REQUEST statistical power
                alpha = 0.05,               # significance level 
                alternative = "two.sided",  # two-sided hypothesis test
                design = "independent")     # independent samples 

To find minimum detectable effect:

power.t.student(d = NULL,                   # << REQUEST Cohen's d effect size    
                n2 = 105,                   # sample size
                power = 0.95,               # statistical power
                alpha = 0.05,               # significance level 
                alternative = "two.sided",  # two-sided hypothesis test
                design = "independent")     # independent samples 

To make the console output “pretty” add pretty = TRUE:

power.t.student(d = 0.50,                   # Cohen's d effect size      
                power = 0.95,               # statistical power
                alpha = 0.05,               # significance level 
                alternative = "two.sided",  # two-sided hypothesis test
                design = "independent",     # independent samples 
                pretty = TRUE)     

To obtain more detailed technical information add verbose = 2:

power.t.student(d = 0.50,                   # Cohen's d effect size      
                power = 0.95,               # statistical power
                alpha = 0.05,               # significance level 
                alternative = "two.sided",  # two-sided hypothesis test
                design = "independent",     # independent samples 
                pretty = TRUE, 
                verbose = 2)     

Inferential errors can be visualized in two ways:

power.t.student(d = 0.50,                   # Cohen's d effect size      
                power = 0.95,               # statistical power
                alpha = 0.05,               # significance level 
                alternative = "two.sided",  # two-sided hypothesis test
                design = "independent",     # independent samples 
                pretty = TRUE, 
                verbose = 2) |> plot()   

or

obj <- power.t.student(d = 0.50,                   # Cohen's d effect size      
                       power = 0.95,               # statistical power
                       alpha = 0.05,               # significance level 
                       alternative = "two.sided",  # two-sided hypothesis test
                       design = "independent",     # independent samples 
                       pretty = TRUE, 
                       verbose = 2) 
plot(obj)

To use the function’s elements elsewhere:

obj <- power.t.student(d = 0.50,                   # Cohen's effect size      
                       power = 0.95,               # statistical power
                       alpha = 0.05,               # significance level 
                       alternative = "two.sided",  # two-sided hypothesis test
                       design = "independent",     # independent samples 
                       pretty = TRUE, 
                       verbose = 2) 

obj$parms                                          # calculation parameters
obj$n                                              # sample size
obj$power                                          # statistical power                                      

total.n <- sum(obj$n)                              # total sample size
inflate.sample(total.n, rate = 0.10)               # accounting for missing data 

You can paste the R code and its output into an AI program to create a publication-ready report and share its link with stakeholders. The following prompt or its variants can be used for this purpose:

Prompt:

Generate a reproducible power analysis report in a neatly formatted table and provide a publication-ready paragraph describing the results. Here is my code and results: <R code> <R output>



2 Correlation

2.1 Effect Size (r)

Cohen (1988)

Very small effect r < 0.10
Small effect 0.10 ≤ r < 0.30
Medium effect 0.30 ≤ r < 0.50
Large effect r ≥ 0.50

Gignac & Szodorai (2016)

Very small effect r < 0.20
Small effect 0.20 ≤ r < 0.40
Medium effect 0.40 ≤ r < 0.60
Large effect 0.60 ≤ r < 0.80
Very large effect r ≥ 0.80

Evans (1996)

Very small effect r < 0.10
Small effect 0.10 ≤ r < 0.20
Medium effect 0.20 ≤ r < 0.30
Large effect r ≥ 0.30

Lovakov & Agadullina (2021)

Very small effect r < 0.12
Small effect 0.12 ≤ r < 0.24
Medium effect 0.24 ≤ r < 0.41
Large effect r ≥ 0.41



2.2 One Sample

Write the R code yourself based on the example report below.

################################################################################
########################## Write the R Code Yourself ###########################
################################################################################

Example Report:

A priori power analysis was conducted using the {pwrss} R package (Bulus & Jentschke, 2026). Specifically, the power.z.onecor() function was employed for a one-sample correlation test. The analysis sought to detect a medium-sized Pearson correlation of ρ = 0.30 between X and Y, tested against a null value of ρ = 0, with a two-tailed test at a significance level of α = 0.05 and a statistical power of 0.95. Under these specifications, a minimum sample size of 139 participants is required. To account for an anticipated attrition rate of 10%, the target sample size was increased to 155 participants.

Show Code and Output
power.z.onecor(rho = 0.30,  
               power = 0.95,
               alpha = 0.05,
               alternative = "two.sided")
+--------------------------------------------------+
|             SAMPLE SIZE CALCULATION              |
+--------------------------------------------------+

One-Sample Correlation (Approximate)

----------------------------------------------------
Hypotheses
----------------------------------------------------
  H0 (Null)        : rho - null.rho  = 0
  H1 (Alternative) : rho - null.rho != 0

----------------------------------------------------
Results
----------------------------------------------------
  Target Effect (rho)  = 0.300 (vs. null.rho = 0)
  Sample Size          = 139  <<
  Type 1 Error (alpha) = 0.050
  Type 2 Error (beta)  = 0.050
  Statistical Power    = 0.950
inflate.sample(n = 139, rate = 0.10)
155



3 T-Tests

3.1 Effect Size (Cohen’s d)

Cohen (1988)

Very small effect d < 0.20
Small effect 0.20 ≤ d < 0.50
Medium effect 0.50 ≤ d < 0.80
Large effect d ≥ 0.80

Gignac & Szodorai (2016)

Very small effect d < 0.20
Small effect 0.20 ≤ d < 0.41
Medium effect 0.41 ≤ d < 0.63
Large effect d ≥ 0.63

Lovakov & Agadullina (2021)

Very small effect d < 0.15
Small effect 0.15 ≤ d < 0.36
Medium effect 0.36 ≤ d < 0.65
Large effect d ≥ 0.65



3.2 One Sample

3.2.1 Parametric

Write the R code yourself based on the example report below.

################################################################################
########################## Write the R Code Yourself ###########################
################################################################################

Example Report:

A priori power analysis was conducted using the {pwrss} R package (Bulus & Jentschke, 2026). Specifically, the power.t.student() function was employed for a one-sample t-test. The analysis sought to detect a medium-sized effect of Cohen’s d = 0.50, representing the standardized difference between the mean of X and a predetermined threshold value, with a one-tailed test at a significance level of α = 0.05 and statistical power of 0.95. Under these specifications, a minimum sample size of 45 participants is required. To account for an anticipated attrition rate of 10%, the target sample size was increased to 50 participants.

Show Code and Output
power.t.student(d = 0.50, 
                power = 0.95,
                alpha = 0.05,
                alternative = "one.sided",
                design = "one.sample")
+--------------------------------------------------+
|             SAMPLE SIZE CALCULATION              |
+--------------------------------------------------+

Student's T-Test (One Sample)

----------------------------------------------------
Hypotheses
----------------------------------------------------
  H0 (Null)        : d - null.d <= 0
  H1 (Alternative) : d - null.d  > 0

----------------------------------------------------
Results
----------------------------------------------------
  Effect Size (d)      = 0.500 (vs. null.d = 0)
  Sample Size          = 45  <<
  Type 1 Error (alpha) = 0.050
  Type 2 Error (beta)  = 0.049
  Statistical Power    = 0.951
inflate.sample(n = 45, rate = 0.10)
50

3.2.2 Nonparametric

Write the R code yourself based on the example report below.

################################################################################
########################## Write the R Code Yourself ###########################
################################################################################

Example Report:

A priori power analysis was conducted using the {pwrss} R package (Bulus & Jentschke, 2026). Specifically, the power.np.wilcoxon() function was employed for a one-sample Wilcoxon signed-rank test, a nonparametric alternative to the one-sample t-test. The analysis sought to detect a medium-sized effect of d = 0.50 relative to a predetermined threshold value of 0, with a one-tailed test at a significance level of α = 0.05 and statistical power of 0.95. In terms of stochastic superiority, this effect corresponds to a 69% probability that a randomly selected individual’s score exceeds the threshold value, compared with 50% under the null hypothesis. Under these specifications, a minimum sample size of 47 participants is required. To account for an anticipated attrition rate of 10%, the target sample size was increased to 53 participants.

Show Code and Output
d.to.cles(d = 0.50, design = "one.sample")
     cles         d 
0.6914625 0.5000000 
power.np.wilcoxon(d = 0.50, 
                  null.d = 0,
                  power = 0.95,
                  alpha = 0.05,
                  alternative = "one.sided",
                  design = "one.sample")
+--------------------------------------------------+
|             SAMPLE SIZE CALCULATION              |
+--------------------------------------------------+

Wilcoxon Signed-Rank Test (One Sample)

  Method       : Guenther
  Distribution : Normal

----------------------------------------------------
Hypotheses
----------------------------------------------------
  H0 (Null)        : d - null.d <= 0
  H1 (Alternative) : d - null.d  > 0

----------------------------------------------------
Results
----------------------------------------------------
  Effect Size (d)      = 0.500 (vs. null.d = 0)
  Sample Size          = 47  <<
  Type 1 Error (alpha) = 0.050
  Type 2 Error (beta)  = 0.049
  Statistical Power    = 0.951
inflate.sample(n = 47, rate = 0.10)
53

3.3 Dependent (Paired) Samples

3.3.1 Parametric

Write the R code yourself based on the example report below.

################################################################################
########################## Write the R Code Yourself ###########################
################################################################################

Example Report:

A priori power analysis was conducted using the {pwrss} R package (Bulus & Jentschke, 2026). Specifically, the power.t.student() function was employed for a paired-samples t-test. The analysis sought to detect a medium-sized difference of d = 0.50 between pre-test and post-test means, with a two-tailed test at a significance level of α = 0.05 and statistical power of 0.95. Under these specifications, a minimum sample size of 54 participants is required. To account for an anticipated attrition rate of 10%, the target sample size was increased to 60 participants.

Show Code and Output
power.t.student(d = 0.50, 
                power = 0.95,
                alpha = 0.05,
                alternative = "two.sided",
                design = "paired")
+--------------------------------------------------+
|             SAMPLE SIZE CALCULATION              |
+--------------------------------------------------+

Student's T-Test (Paired Samples)

----------------------------------------------------
Hypotheses
----------------------------------------------------
  H0 (Null)        : d - null.d  = 0
  H1 (Alternative) : d - null.d != 0

----------------------------------------------------
Results
----------------------------------------------------
  Effect Size (d)      = 0.500 (vs. null.d = 0)
  Sample Size          = 54  <<
  Type 1 Error (alpha) = 0.050
  Type 2 Error (beta)  = 0.050
  Statistical Power    = 0.950
inflate.sample(n = 54, rate = 0.10)
60

3.3.2 Nonparametric

Write the R code yourself based on the example report below.

################################################################################
########################## Write the R Code Yourself ###########################
################################################################################

Example Report:

A priori power analysis was conducted using the {pwrss} R package (Bulus & Jentschke, 2026). Specifically, the power.np.wilcoxon() function was employed for a paired-samples Wilcoxon signed-rank test, a nonparametric alternative to the paired-samples t-test. The analysis sought to detect a medium-sized effect of d = 0.50 between pre-test and post-test scores, with a two-tailed test at a significance level of α = 0.05 and statistical power of 0.95. In terms of stochastic superiority, this effect corresponds to a 69% probability that a randomly selected individual’s post-test score exceeds their pre-test score, compared with 50% under the null hypothesis. Under these specifications, a minimum sample size of 57 participants is required. To account for an anticipated attrition rate of 10%, the target sample size was increased to 64 participants.

Show Code and Output
d.to.cles(d = 0.50, design = "paired")
     cles         d 
0.6914625 0.5000000 
power.np.wilcox(d = 0.50, 
                power = 0.95,
                alpha = 0.05,
                alternative = "two.sided",
                design = "paired")
+--------------------------------------------------+
|             SAMPLE SIZE CALCULATION              |
+--------------------------------------------------+

Wilcoxon Signed-Rank Test (Paired Samples)

  Method       : Guenther
  Distribution : Normal

----------------------------------------------------
Hypotheses
----------------------------------------------------
  H0 (Null)        : d - null.d  = 0
  H1 (Alternative) : d - null.d != 0

----------------------------------------------------
Results
----------------------------------------------------
  Effect Size (d)      = 0.500 (vs. null.d = 0)
  Sample Size          = 57  <<
  Type 1 Error (alpha) = 0.050
  Type 2 Error (beta)  = 0.048
  Statistical Power    = 0.952
inflate.sample(n = 57, rate = 0.10)
64

3.4 Independent Samples

3.4.1 Equal Variances

Write the R code yourself based on the example report below.

################################################################################
########################## Write the R Code Yourself ###########################
################################################################################

Example Report:

A priori power analysis was conducted using the {pwrss} R package (Bulus & Jentschke, 2026). Specifically, the power.t.student() function was employed for an independent-samples t-test, assuming equal variances and equal group sizes. The analysis sought to detect a medium-sized difference of d = 0.50 between two group means, with a two-tailed test at a significance level of α = 0.05 and statistical power of 0.95. Under these specifications, a minimum total sample size of 210 participants (105 per group) is required. To account for an anticipated attrition rate of 10%, the target sample size was increased to 234 participants (117 per group).

Show Code and Output
power.t.student(d = 0.50, 
                power = 0.95,
                alpha = 0.05,
                alternative = "two.sided",
                design = "independent")
+--------------------------------------------------+
|             SAMPLE SIZE CALCULATION              |
+--------------------------------------------------+

Student's T-Test (Independent Samples)

----------------------------------------------------
Hypotheses
----------------------------------------------------
  H0 (Null)        : d - null.d  = 0
  H1 (Alternative) : d - null.d != 0

----------------------------------------------------
Results
----------------------------------------------------
  Effect Size (d)      = 0.500 (vs. null.d = 0)
  Sample Size          = 105 and 105  <<
  Type 1 Error (alpha) = 0.050
  Type 2 Error (beta)  = 0.050
  Statistical Power    = 0.950
inflate.sample(n = 210, rate = 0.10)
234

3.4.2 Unequal Variances

Write the R code yourself based on the example report below.

################################################################################
########################## Write the R Code Yourself ###########################
################################################################################

Example Report:

A priori power analysis was conducted using the {pwrss} R package (Bulus & Jentschke, 2026). Specifically, the power.t.welch() function was employed for an independent-samples Welch’s t-test, with an assumed variance ratio of 2 between the groups. The analysis sought to detect a medium-sized difference of d = 0.50 between two group means, with a two-tailed test at a significance level of α = 0.05 and statistical power of 0.95. Under these specifications, a minimum total sample size of 212 participants (106 per group) is required. To account for an anticipated attrition rate of 10%, the target sample size was increased to 236 participants (118 per group).

Show Code and Output
power.t.welch(d = 0.50, 
              var.ratio = 2, 
              power = 0.95,
              alpha = 0.05,
              alternative = "two.sided")
+--------------------------------------------------+
|             SAMPLE SIZE CALCULATION              |
+--------------------------------------------------+

Welch's T-Test (Independent Samples)

----------------------------------------------------
Hypotheses
----------------------------------------------------
  H0 (Null)        : d - null.d  = 0
  H1 (Alternative) : d - null.d != 0

----------------------------------------------------
Results
----------------------------------------------------
  Effect Size (d)      = 0.500 (vs. null.d = 0)
  Sample Size          = 106 and 106  <<
  Type 1 Error (alpha) = 0.050
  Type 2 Error (beta)  = 0.048
  Statistical Power    = 0.952
inflate.sample(n = 212, rate = 0.10)
236

3.4.3 Nonparametric

Write the R code yourself based on the example report below.

################################################################################
########################## Write the R Code Yourself ###########################
################################################################################

Example Report:

A priori power analysis was conducted using the {pwrss} R package (Bulus & Jentschke, 2026). Specifically, the power.np.wilcoxon() function was employed for an independent-samples Wilcoxon-Mann-Whitney test, a nonparametric alternative to the independent-samples t-test. The analysis sought to detect a medium-sized effect of d = 0.50 between two groups, with a two-tailed test at a significance level of α = 0.05 and statistical power of 0.95. In terms of stochastic superiority, this effect corresponds to an approximately 64% probability that a randomly selected individual from one group scores higher than a randomly selected individual from the other group, compared with 50% under the null hypothesis. Under these specifications, a minimum total sample size of 220 participants (110 per group) is required. To account for an anticipated attrition rate of 10%, the target sample size was increased to 245 participants (122 or 123 per group).

Show Code and Output
d.to.cles(d = 0.50, design = "independent")
     cles         d 
0.6381632 0.5000000 
power.np.wilcox(d = 0.50, 
                power = 0.95,
                alpha = 0.05,
                alternative = "two.sided",
                design = "independent")
+--------------------------------------------------+
|             SAMPLE SIZE CALCULATION              |
+--------------------------------------------------+

Wilcoxon Rank-Sum Test (Independent Samples) 
(Wilcoxon-Mann-Whitney or Mann-Whitney U Test)

  Method       : Guenther
  Distribution : Normal

----------------------------------------------------
Hypotheses
----------------------------------------------------
  H0 (Null)        : d - null.d  = 0
  H1 (Alternative) : d - null.d != 0

----------------------------------------------------
Results
----------------------------------------------------
  Effect Size (d)      = 0.500 (vs. null.d = 0)
  Sample Size          = 110 and 110  <<
  Type 1 Error (alpha) = 0.050
  Type 2 Error (beta)  = 0.050
  Statistical Power    = 0.950
inflate.sample(n = 220, rate = 0.10)
245



4 ANOVA and ANCOVA

4.1 Effect Size (Cohen’s η²)

Cohen (1992)

Very small effect η² < 0.02
Small effect 0.02 ≤ η² < 0.13
Medium effect 0.13 ≤ η² < 0.26
Large effect η² ≥ 0.26



4.2 One Factor

Write the R code yourself based on the example report below.

################################################################################
########################## Write the R Code Yourself ###########################
################################################################################

Example Report:

A priori power analysis was conducted using the {pwrss} R package (Bulus & Jentschke, 2026). Specifically, the power.f.ancova() function was employed for a one-way analysis of covariance (ANCOVA) comparing four groups while controlling for three covariates. The analysis sought to detect a medium-sized effect of partial η² = 0.13 (Cohen, 1992) at a significance level of α = 0.05 with statistical power of 0.95. Under these specifications, a minimum total sample size of 120 participants (30 per group) is required. To account for an anticipated attrition rate of 10%, the target sample size was increased to 134 participants (33 or 34 per group).

Show Code and Output
power.f.ancova(eta.squared = 0.13,
               factor.levels = 4,
               k.covariates = 3,
               power = 0.95,
               alpha = 0.05)
+--------------------------------------------------+
|             SAMPLE SIZE CALCULATION              |
+--------------------------------------------------+

One-Way Analysis of Covariance (F-Test)

----------------------------------------------------
Hypotheses
----------------------------------------------------
  H0 (Null)        : eta.squared = 0
  H1 (Alternative) : eta.squared > 0

----------------------------------------------------
Results
----------------------------------------------------
  Effect Size (eta-squared) = 0.130
  Total Sample Size         = 120  <<
  Type 1 Error (alpha)      = 0.050
  Type 2 Error (beta)       = 0.048
  Statistical Power         = 0.952
inflate.sample(n = 120, rate = 0.10)
134

4.3 Two-Factor Interaction

Write the R code yourself based on the example report below.

################################################################################
########################## Write the R Code Yourself ###########################
################################################################################

Example Report:

A priori power analysis was conducted using the {pwrss} R package (Bulus & Jentschke, 2026). Specifically, the power.f.ancova() function was employed for a 4 × 3 factorial analysis of covariance (ANCOVA) with three covariates. The analysis sought to detect a small interaction effect of partial η² = 0.02 (Cohen, 1992) at a significance level of α = 0.05 with statistical power of 0.95. Under these specifications, a minimum total sample size of 1,032 participants (86 per cell) is required. To account for an anticipated attrition rate of 10%, the target sample size was increased to 1,152 participants (96 per cell).

Show Code and Output
power.f.ancova(eta.squared = 0.02,
               factor.levels = c(4,3), 
               k.covariates = 3,
               power = 0.95,
               alpha = 0.05)
+--------------------------------------------------+
|             SAMPLE SIZE CALCULATION              |
+--------------------------------------------------+

Two-Way Analysis of Covariance (F-Test)

----------------------------------------------------
Hypotheses
----------------------------------------------------
  H0 (Null)        : eta.squared = 0
  H1 (Alternative) : eta.squared > 0

----------------------------------------------------
Results
----------------------------------------------------
  Effect Size (eta-squared) = 0.020
  Total Sample Size         = 1032  <<
  Type 1 Error (alpha)      = 0.050
  Type 2 Error (beta)       = 0.049
  Statistical Power         = 0.951
inflate.sample(n = 1032, rate = 0.10)
1147



5 Regression

5.1 Effect Size (R²)

Cohen (1988)

Very small effect R² < 0.02
Small effect 0.02 ≤ R² < 0.13
Medium effect 0.13 ≤ R² < 0.26
Large effect R² ≥ 0.26

Falk & Miller (1992)

Negligible R² < 0.10
Non-negligible R² ≥ 0.10



5.2 Model Fit

Write the R code yourself based on the example report below.

################################################################################
########################## Write the R Code Yourself ###########################
################################################################################

Example Report:

A priori power analysis was conducted using the {pwrss} R package (Bulus & Jentschke, 2026). Specifically, the power.f.regression() function was employed for the omnibus F-test of a multiple linear regression model with five predictors. The analysis sought to detect whether a medium-sized proportion of explained variance, R² = 0.13 (Cohen, 1988), differs significantly from zero, at a significance level of α = 0.05 with statistical power of 0.95. Under these specifications, a minimum sample size of 139 participants is required. To account for an anticipated attrition rate of 10%, the target sample size was increased to 155 participants.

Show Code and Output
power.f.regression(r.squared = 0.13,
                   k.total = 5,
                   power = 0.95,
                   alpha = 0.05)
+--------------------------------------------------+
|             SAMPLE SIZE CALCULATION              |
+--------------------------------------------------+

Linear Regression (F-Test) - Fixed Predictors

----------------------------------------------------
Hypotheses
----------------------------------------------------
  H0 (Null)        : R-squared = 0
  H1 (Alternative) : R-squared > 0

----------------------------------------------------
Results
----------------------------------------------------
  Effect Size (R-squared) = 0.130
  Sample Size             = 139  <<
  Type 1 Error (alpha)    = 0.050
  Type 2 Error (beta)     = 0.048
  Statistical Power       = 0.952
inflate.sample(n = 139, rate = 0.10)
155

5.3 Change in Model Fit

Write the R code yourself based on the example report below.

################################################################################
########################## Write the R Code Yourself ###########################
################################################################################

Example Report:

A priori power analysis was conducted using the {pwrss} R package (Bulus & Jentschke, 2026). Specifically, the power.f.regression() function was employed for the F-test of change in R² in a hierarchical multiple regression. The analysis sought to detect a medium-sized increase in explained variance of ΔR² = 0.13 (Cohen, 1988) when adding two predictors (X4 and X5) to a model already containing three predictors (X1, X2, and X3), at a significance level of α = 0.05 with statistical power of 0.95. Under these specifications, a minimum sample size of 107 participants is required. To account for an anticipated attrition rate of 10%, the target sample size was increased to 119 participants.

Show Code and Output
power.f.regression(r.squared.change = 0.13,
                   k.total = 5,
                   k.tested = 2,
                   power = 0.95,
                   alpha = 0.05)
+--------------------------------------------------+
|             SAMPLE SIZE CALCULATION              |
+--------------------------------------------------+

Hierarchical Linear Regression (F-Test) - Fixed Pred

----------------------------------------------------
Hypotheses
----------------------------------------------------
  H0 (Null)        : Change in R-squared = 0
  H1 (Alternative) : Change in R-squared > 0

----------------------------------------------------
Results
----------------------------------------------------
  Effect Size (R-squared) = 0.130
  Sample Size             = 107  <<
  Type 1 Error (alpha)    = 0.050
  Type 2 Error (beta)     = 0.049
  Statistical Power       = 0.951
inflate.sample(n = 107, rate = 0.10)
119

5.4 Regression Coefficient

Write the R code yourself based on the example report below.

################################################################################
########################## Write the R Code Yourself ###########################
################################################################################

Example Report:

A priori power analysis was conducted using the {pwrss} R package (Bulus & Jentschke, 2026). Specifically, the power.t.regression() function was employed for the t-test of an individual regression coefficient in a multiple linear regression model comprising one focal predictor and two covariates. The analysis sought to detect whether the standardized regression coefficient of the focal predictor, β = 0.30, differs significantly from zero, with a two-tailed test at a significance level of α = 0.05 and statistical power of 0.95. The full model was assumed to explain 50% of the variance in the outcome (R² = .50). Under these specifications, a minimum sample size of 75 participants is required. To account for an anticipated attrition rate of 10%, the target sample size was increased to 84 participants.

Show Code and Output
power.t.regression(beta = 0.30, 
                   k.total = 3,
                   r.squared = 0.50,
                   power = 0.95,
                   alpha = 0.05)
+--------------------------------------------------+
|             SAMPLE SIZE CALCULATION              |
+--------------------------------------------------+

Linear Regression Coefficient (T-Test)

----------------------------------------------------
Hypotheses
----------------------------------------------------
  H0 (Null)        : beta - null.beta  = 0
  H1 (Alternative) : beta - null.beta != 0

----------------------------------------------------
Results
----------------------------------------------------
  Target Effect (Std. beta) = 0.300
  Sample Size               = 75  <<
  Type 1 Error (alpha)      = 0.050
  Type 2 Error (beta)       = 0.048
  Statistical Power         = 0.952
inflate.sample(n = 75, rate = 0.10)
84



6 Method Comparisons

The table below gives effect size conversions for comparing two independent groups. Using the effect sizes presented in the table, calculate the minimum sample size required to detect each effect at a significance level of α = 0.05 with statistical power of 0.95. Compare the following approaches:

  • T-Test (t)
  • Correlation (z)
  • Regression (t)
  • Regression (F)
  • ANOVA (F)

Effect Size Conversions

d r η²
0.20 0.0995037 0.0099010 0.0099010
0.50 0.2425356 0.0588235 0.0588235
0.80 0.3713907 0.1379311 0.1379311
The https://www.escal.site/ website or the effectsize R package can be used for these effect size conversions.

These conversions are valid only for two-group mean comparison.

7 References

Bulus, M., & Jentschke, S. (2026). pwrss: Statistical Power, Sample Size, and Detectable Effect Calculations. R package version 1.2.0, https://doi.org/10.32614/CRAN.package.pwrss

Bulus, M., & Polat, C. (2023). pwrss R paketi ile istatistiksel güç analizi [Statistical power analysis with the pwrss R package]. Ahi Evran Üniversitesi Kırşehir Eğitim Fakültesi Dergisi, 24(3), 2207-2328. https://doi.org/10.29299/kefad.1209913

Cohen, J. (1988). Statistical power analysis for the behavioral sciences (2nd Ed). Routledge.

Cohen, J. (1992). A power primer. Psychological Bulletin, 112(1), 155-159. https://doi.org/10.1037//0033-2909.112.1.155

Evans, J. D. (1996). Straightforward statistics for the behavioral sciences. Thomson Brooks/Cole Publishing.

Falk, R. F., & Miller, N. B. (1992). A primer for soft modeling. University of Akron Press.

Gignac, G. E., & Szodorai, E. T. (2016). Effect size guidelines for individual differences researchers. Personality and Individual Differences , 102(2016), 74-78. https://doi.org/10.1016/j.paid.2016.06.069

Lovakov, A., & Agadullina, E. R. (2021). Empirically derived guidelines for effect size interpretation in social psychology. European Journal of Social Psychology , 51(3), 485-504. https://doi.org/10.1002/ejsp.2752