Learn R Programming

statpsych (version 1.7.0)

size.test.sign.ps: Sample size for a paired-samples sign test

Description

Computes sample size required for a paired-samples sign test with desired power. The null hypothesis can be expressed in terms of a population proportion. In a paired-samples experiment, the proportion is defined as the proportion of members in the population with scores that would be larger under treatment 1 than treatment 2. In a paired-samples nonexperiment, the proportion is the proportion of members in the population with measurement 1 scores that are larger than their measurement 2 scores. Under the null hypothesis, the proportion is equal to .5. This function requires a planning value of this population proportion.

Usage

size.test.sign.ps(alpha, pow, p)

Value

Returns the required sample size

Arguments

alpha

alpha level for hypothesis test

pow

desired power

p

planning value of proportion

Examples

Run this code
size.test.sign.ps(.05, .90, .75)

# Should return:
# Sample size
#          42
 

Run the code above in your browser using DataLab