nSRS: Calculates the sample size for SRS

Description Usage Arguments Value Examples

View source: R/nSRS.R

Description

This function calculates de sample size in a SRS design based on one of three possible arguments: σ^2, pq or CV. Provide just one of then.

Usage

1
nSRS(moe, alpha, CV = NULL, S2 = NULL, pq = NULL, N = Inf)

Arguments

moe

Margin of error.

alpha

1 - (confidence level).

CV

Variaton coefficient.

S2

σ^2, population variance.

pq

P(1 - P), population variance for proportions.

N

Population size.

Value

The value of n.

Examples

1
2
3
nSRS(moe=0.05,alpha=0.05,S2=6,N=1500)
nSRS(moe=0.05,alpha=0.05,CV=0.2,N=1500)
nSRS(moe=0.05,alpha=0.05,pq=0.25,N=1500)

cgu-dados/auditsampling documentation built on March 24, 2021, 9:38 a.m.