pwr2ppl (version 0.1.1)

tfromd: 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 = 1)

Arguments

d

standardize mean difference (Cohen's d)

nlow

Starting sample size

nhigh

Ending 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

Run this code
# NOT RUN {
tfromd(d=.2,nlow=10,nhigh=200,by=10, test="P")
tfromd(d=.2,nlow=10,nhigh=200,by=10, test="I")
# }

Run the code above in your browser using DataCamp Workspace