tfromd: Compute power for a t test using d statistic Takes d, sample...

View source: R/tfromd.R

tfromdR Documentation

Compute power for a t test using d statistic Takes d, sample size range, type of test, and tails.

Description

Compute power for a t test using d statistic Takes d, sample size range, type of test, and tails.

Usage

tfromd(d, nlow, nhigh, alpha = 0.05, test = "I", tails = 2, by = 2)

Arguments

d

standardize mean difference (Cohen's d)

nlow

Starting total sample size

nhigh

Ending total sample size

alpha

Type I error (default is .05)

test

"I" for independent, "P" for paired

tails

one or two-tailed tests (default is 2)

by

Incremental increase in sample size from low to high

Value

Power for the t-test from d statistic

Examples

tfromd(d=.2,nlow=10,nhigh=200,by=10, test="P")
tfromd(d=.2,nlow=10,nhigh=200,by=10, test="I")

chrisaberson/pwr2ppl documentation built on Sept. 10, 2022, 2:59 a.m.