SscSrsMean: Sample size calculator for estimation of population mean...

View source: R/SscSrsMean.R

SscSrsMeanR Documentation

Sample size calculator for estimation of population mean under SRS

Description

The SscSrsMean function calculates the sample size required for estimation of population mean based upon the availability of prior information on coefficient of variation (CV) of the population under Simple Random Sampling (SRS) with or without replacement sampling design for a given confidence level and relative error. Further, the function provides the required sample size when population CV is known whereas it provides both required sample size and additional sample units to be surveyed when population CV is unknown under both SRS with or without replacement.

Usage

SscSrsMean(CV_known, replace, alpha, re, N, preliminary_sample, cv_value = NA)

Arguments

CV_known

Logical. TRUE if CV of the population is known; FALSE otherwise.

replace

Logical. TRUE for SRSWR; FALSE for SRSWOR.

alpha

Level of significance (e.g., 0.05 for 5% level).

re

Relative error in the estimate (e.g., 0.1 for 10%).

N

Population size. Use NA for SRSWR.

preliminary_sample

Numeric vector. Preliminary sample data; NA if CV is known.

cv_value

Numeric. Known CV when CV_known = TRUE; ignored if CV_known = FALSE.

Details

Returns the sample size for estimation of the population mean under SRS with or without replacement. For unknown CV, also returns the number of extra units needed beyond the preliminary sample.

Value

A list with the following components:

Required sample size

The required sample size for the given inputs.

Additional sample units to be surveyed

Only for unknown CV: additional units beyond preliminary sample size.

References

Cochran, W. G. (1977). Sampling Techniques, 3rd Edition. New York: John Wiley & Sons.

Singh, D. and Chaudhary, F.S. (1986). Theory and Analysis of Sample Survey Designs. New York: John Wiley & Sons, Inc.

Sukhatme, P.V., Sukhatme, B.V., Sukhatme, S. and Asok, C. (1984). Sampling Theory of Surveys with Applications. Iowa State University Press, Ames and Indian Society of Agricultural Statistics, New Delhi.

Examples

# Known CV, SRSWOR
SscSrsMean(TRUE, FALSE, 0.05, 0.2, 100, NA, cv_value = 0.3)

# Unknown CV, SRSWOR
prelim <- c(12, 14, 8, 5, 36, 24, 18, 17, 6, 9)
SscSrsMean(FALSE, FALSE, 0.05, 0.2, 100, prelim)

# Known CV, SRSWR
SscSrsMean(TRUE, TRUE, 0.05, 0.2, NA, NA, cv_value = 0.3)


SampleSizeCalculator documentation built on Aug. 27, 2025, 5:11 p.m.