n_2t_unequal: Calculate Per-Group Sample Size for Two-Sample Unequal...

Description Usage Arguments Value Examples

View source: R/n_2t_unequal.R

Description

Unequal variance version of n_2t_equal. Assumes an equal sample size for both groups, which is actually not optimal.

Usage

1
n_2t_unequal(d, sigsq1, sigsq2, alpha = 0.05, beta = 0.2)

Arguments

d

Numeric value specifying true difference in group means.

sigsq1, sigsq2

Numeric value specifying the variance of observations in each group.

alpha

Numeric value specifying type-1 error rate.

beta

Numeric value specifying type-2 error rate.

Value

Numeric value indicating per-group sample size, rounded up to the nearest whole number.

Examples

1
2
3
# Per-group sample size for 90% power to detect difference of 0.2 with
# sigsq's of 1 and 1.25
n_2t_unequal(d = 0.2, sigsq1 = 1, sigsq2 = 1.25, beta = 0.1)

dvmisc documentation built on Dec. 18, 2019, 1:35 a.m.