Type: | Package |
Title: | Sample Size Calculator for Estimation of Population Mean and Proportion under SRS |
Version: | 0.1.0 |
Depends: | R(≥ 2.10) |
Suggests: | knitr, rmarkdown, testthat (≥ 3.0.0) |
Description: | It helps in determination of sample size for estimation of population mean and proportion 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. If there is no prior information on the population CV, then a small preliminary sample of size is selected to estimate the population CV which is then used for determination of final sample size. If the final sample size is more than the preliminary sample size, then the preliminary sample is augmented by drawing additional units from the remaining population units so that the size of the augmented sample is equal to the final sample size. On the other hand, if the preliminary sample size is larger than the final sample size, then the preliminary sample is considered as the final sample. |
License: | GPL-2 | GPL-3 [expanded from: GPL (≥ 2.0)] |
Encoding: | UTF-8 |
Imports: | stats |
RoxygenNote: | 7.3.1 |
NeedsCompilation: | no |
Author: | Pradip Basak [aut, cph, cre] |
Maintainer: | Pradip Basak <pradip@ubkv.ac.in> |
Packaged: | 2025-04-29 05:25:57 UTC; Dr. Pradeep |
Repository: | CRAN |
Date/Publication: | 2025-04-30 11:30:02 UTC |
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)
Arguments
CV_known |
Coefficient of variation (CV) of the population is known or unknown. If it is known, then write TRUE otherwise write FALSE. |
replace |
replace=TRUE, if sampling design is SRSWR and replace=FALSE, if sampling design is SRSWOR. |
alpha |
Level of significance value, alpha=0.01 at 1 percent level of significance and alpha=0.05 at 5 percent level of significance. |
re |
Relative error in the estimation of population mean (e.g. 0.1, 0.5). |
N |
Population size. When sampling design is SRSWR, then write NA. |
preliminary_sample |
Values of the study variable for the preliminary sample. When CV of the population is known, then write NA. |
Details
This function returns the sample size required for estimation of population mean when population CV is known. Besides this, the function returns both required sample size and additional sample units to be surveyed when population CV is unknown under both SRS with or without replacement sampling design.
Value
A list with the following components:
Required sample size |
Sample size required for estimation of population mean when population CV is known or unknown. |
Additional sample units to be surveyed |
Additional sample units to be surveyed over the preliminary sample for estimation of population mean when population CV is unknown. If the value of additional sample units to be surveyed is negative, then preliminary sample is considered as the final sample. |
References
Cochran, W. G. (1977). Sampling Techniques, 3rd Edition. New York: John Wiley & Sons, Inc.
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
# Calculate sample size for SRSWOR design when population CV is known
SscSrsMean(TRUE, FALSE, 0.05, 0.2, 100, NA)
# Calculate sample size for SRSWOR design when population CV is unknown
preliminary_sample =c(12, 14, 8, 5, 36, 24, 18, 17, 6, 9)
SscSrsMean(FALSE, FALSE, 0.05, 0.2, 100, preliminary_sample)
# Calculate sample size for SRSWR design when population CV is known
SscSrsMean(TRUE, TRUE, 0.05, 0.2, NA, NA)
# Calculate sample size for SRSWR design when population CV is unknown
preliminary_sample =c(12, 14, 8, 5, 36, 24, 18, 17, 6, 9)
SscSrsMean(FALSE, TRUE, 0.05, 0.2, NA, preliminary_sample)
Sample size calculator for estimation of population proportion under SRS
Description
The SscSrsProp function calculates the sample size required for estimation of population proportion under Simple Random Sampling (SRS) with or without replacement sampling design for a given confidence level and relative error under the assumption than population CV is unknown. Further, the function provides the number of additional sample units to be surveyed over the preliminary sample under both SRS with or without replacement.
Usage
SscSrsProp(replace, alpha, re, N, preliminary_sample)
Arguments
replace |
replace=TRUE, if sampling design is SRSWR and replace=FALSE, if sampling design is SRSWOR. |
alpha |
Level of significance value, alpha=0.01 at 1 percent level of significance and alpha=0.05 at 5 percent level of significance. |
re |
Relative error in the estimation of population proportion (e.g. 0.1, 0.5). |
N |
Population size. When sampling design is SRSWR, then write NA. |
preliminary_sample |
Values of the study variable (in 0 or 1) for the preliminary sample. |
Details
This function returns the required sample size as well as additional sample units to be surveyed over the preliminary sample for both SRS with or without replacement sampling design.
Value
A list with the following components:
Required sample size |
Sample size required for estimation of population proportion. |
Additional sample units to be surveyed |
Additional sample units to be surveyed over the preliminary sample for estimation of population proportion. If the value of additional sample units to be surveyed is negative, then preliminary sample is considered as the final sample. |
References
Cochran, W. G. (1977). Sampling Techniques, 3rd Edition. New York: John Wiley & Sons, Inc.
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
# Calculate sample size for SRSWOR design for estimation of population proportion
preliminary_sample=c(1,0,1,1,1,0,0,0,1,1)
SscSrsProp(FALSE, 0.05, 0.2, 500, preliminary_sample)
# Calculate sample size for SRSWR design for estimation of population proportion
preliminary_sample=c(1,0,1,1,0,1,1,1,0,0,0,1,1,1,1)
SscSrsProp(TRUE, 0.05, 0.2, NA, preliminary_sample)