RM.pwr.t.test: RM.pwr.t.test

Description Arguments Details References See Also

View source: R/RM.pwr.t.test.R

Description

This function calculates the effective number of participants in a power analysis for t-tests after considering the effect of the number of measurement for each dependent variable and the intra-class correlation of these measurements.

Arguments

d

Cohen's d effect size

sig.level

Alpha level

power

Desired statistical power

type

Select one of "one.sample", "two.sample" or "paired"

alternative

Select one of "two.sided", "greater" or "less"

corr

Intra-class correlation between the replicated measurements.

m

Number of replicated measurements.

Details

The function returns the effective number of participants to attain the specified statistical power. You do not need to specify that n is NULL. For more details about this statistical power adjustment, see Goulet & Cousineau (2019).

#' @examples # Calculating the effective sample size required for a one sample t-test # Intra-class correlation is .3 and number of replicated measurements is 20. RM.pwr.t.test( d = .4, # Want to detect a Cohen's d of 0.4 sig.level = .05, power = .80, type = "one.sample", alternative = "two.sided", corr = .3, m = 20 )

# Calculating the effective sample size required for a two sample paired t-test. # Intra-class correlation is .2 and number of replicated measurements is 100. RM.pwr.t.test( d = .25, # Want to detect a Cohen's d of 0.25 sig.level = .05, power = .95, type = "paired", alternative = "two.sided", corr = .2, m = 100 )

References

Goulet, M.A. & Cousineau, D. (2019). The power of replicated measures to increase statistical power. Advances in Methods and Practices in Psychological Sciences, 2(3), 199-213. DOI:10.1177/2515245919849434

See Also

pwr.t.test


magoulet93/RM.pwr documentation built on May 5, 2020, 7:18 a.m.