Learn R Programming

BayesianHybridDesign (version 0.1.0)

Two.Prop.Test.Sample.Size: Sample Size for Comparing Two Proportions

Description

Calculates the required sample size for a two-group comparison of proportions based on the method of Casagrande, Pike, and Smith (1978).

Usage

Two.Prop.Test.Sample.Size(p1, p2, alpha, beta, r)

Value

A numeric vector of length two:

  • The required sample size for Arm 1 ($n_1$).

  • The total required sample size ($n_1 + n_2$).

Arguments

p1

A scalar. The anticipated proportion in Arm 1 (e.g., control).

p2

A scalar. The anticipated proportion in Arm 2 (e.g., experimental).

alpha

A scalar. The one-sided Type I error rate.

beta

A scalar. The Type II error rate (1 - power).

r

A scalar. The randomization ratio of Arm 2 to Arm 1 ($n_2/n_1$).

See Also

Examples

Run this code
Two.Prop.Test.Sample.Size(p1=0.27, p2=0.47, alpha = 0.10, beta=0.2, r=2)

Run the code above in your browser using DataLab