samplesize.d: Sample size estimation in the t test for means

Description Usage Arguments Value Author(s) References See Also Examples

Description

samplesize.d determines the sample size, when specified the effect size to be detected, desired statistical power, and significance level. samplesize.d always specifies two-sided test.

Usage

1
samplesize.d(delta, power = 0.8, sig.level = 0.05)

Arguments

delta

a numeric contains the effect size (Cohen's d) to be detected

power

a numeric contains the desired statistical power (default 0.80)

sig.level

a numeric contains the significance level (default 0.05)

Value

Return a numeric containing the appropriate sample size in each group.

Author(s)

Yasuyuki Okumura
Department of Social Psychiatry,
National Institute of Mental Health,
National Center of Neurology and Psychiatry
yokumura@blue.zero.jp

References

Cohen J (1988). Statistical power analysis for the behavioral sciences (2nd ed). Hillsdale, NJ: Erlbaum.

See Also

ind.t.test, ind.t.test.second

Examples

1
2
##Cohen (1988) ex.2.9
samplesize.d(delta=.20, power=.95, sig.level=.05)

Example output

Loading required package: gtools
[1] 651

rpsychi documentation built on May 1, 2019, 10:10 p.m.