ssize.p.test: Sample Size of a Z-Test for Population Proportion

Description Usage Arguments Value Examples

View source: R/ssize_p_test.R

Description

Computes the Sample Size of a Z-test for the Population Proportion

Usage

1
ssize.p.test(p0, p1, power = 0.9, sig.level = 0.05, alternative = "two.sided")

Arguments

p0

The value of the population proportion from the null hypothesis (in decimal form)

p1

An alternative value of the population proportion

power

Power of the test

sig.level

Significance level, default is 0.05

alternative

type of alternative, with values "two.sided","less" or "greater"

Value

Sample size required to achieve the given power

Examples

1
2
3
4
ssize.p.test(p0 = 0.10, p1 = 0.08, power = 0.9,
sig.level = 0.01, alternative = "two.sided")
ssize.p.test(p0 = 0.30, p1 = 0.25, power = 0.92,
sig.level = 0.10, alternative = "less")

alurie43/stats4332 documentation built on Dec. 19, 2021, 1:37 a.m.