Learn R Programming

statpsych (version 1.7.0)

size.test.sign: Sample size for a 1-group sign test

Description

Computes the sample size required for a 1-group sign test with desired power (see size.test.sign.ps for a paired-samples sign test). The Sign test is a test of the null hypothesis that the population median is equal to some specified value. This null hypothesis can also be expressed in terms of the proportion of scores in the population that are greater than the hypothesized population median value. Under the null hypothesis, this proportion is equal to .5. This function requires a planning value of this population proportion.

Usage

size.test.sign(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(.05, .90, .3)

# Should return:
# Sample size
#          67
 

Run the code above in your browser using DataLab