Title: | RDS Sample Size Estimation and Power Calculation |
---|---|
Description: | Provides functionality for carrying out sample size estimation and power calculation in Respondent-Driven Sampling. |
Authors: | Yibo Wang [aut, cre], Michael R. Elliott [aut], Sunghee Lee [aut] |
Maintainer: | Yibo Wang <[email protected]> |
License: | GPL-3 |
Version: | 0.5.0 |
Built: | 2025-02-08 04:08:03 UTC |
Source: | https://github.com/cran/RDSsamplesize |
Calculating the accumulated sample size distribution by each wave.
calSize(s, c, maxWave, rr, bruteMC, tol = 0.025)
calSize(s, c, maxWave, rr, bruteMC, tol = 0.025)
s |
scalar; Number of seeds to initiate the sampling process. |
c |
scalar; Number of coupons issued to each participant. |
maxWave |
scalar; Planned field period scaled by wave, which does not include the initial round of recruiting seeds. |
rr |
scalar or vector; a (constant) recruitment rate or a vector of length maxWave, listing varying recruitment rates at each wave. The recruitment rate represents the average coupon use rate. For example, if rr is a vector, the wth element is the ratio of the number of successful recruits brought into the study at wave w by their recruiters (participants from wave w-1) to the total number of coupons issued to those recruiters, where w ranges from 1 to maxWave. Seeds are counted as participants at Wave 0. |
bruteMC |
logical; If TRUE then use a brute force Monte Carlo approach to obtain empirical data and estimate sample size distribution; If FALSE then compute the theoretical results of sample size distribution using an approximation algorithm. |
tol |
scalar; Accuracy loss limit control, which is set up for the approximation algorithm when bruteMC=FALSE, with default of 0.025. This parameter determines the acceptable level of accuracy loss in the approximate computation of the sample size distribution. |
a list consisting of the following elements:
Pr_Extinction_list |
vector; a vector of extinction probabilities, i.e., probability of not recruiting any new participants at each wave. |
Pr_Size_by_Wave_w |
list; probability mass function and complementary cumulative distribution function of attaining a certain sample size (including seeds) by each wave, w=1,...,maxWave. The round of seed collection is counted as wave 0. |
Raychaudhuri, Samik. Introduction to monte carlo simulation, 2008 Winter simulation conference. IEEE, 2008.
x <- calSize(s=10,c=3,maxWave=9,rr=0.3,bruteMC=FALSE,tol=0.025)
x <- calSize(s=10,c=3,maxWave=9,rr=0.3,bruteMC=FALSE,tol=0.025)
Summarizing the sample size estimation.
nprobw(x, n)
nprobw(x, n)
x |
an object class of "RDSsamplesize", results of estimated sample size distribution of a call to 'calSize'. |
n |
integer; target sample size. |
a table presenting the probability of the accumulated sample size (including seeds) reaching at least n by each wave, w=1,..., maxWave
x <- calSize(s=10,c=3,maxWave=9,rr=0.3,bruteMC=FALSE,tol=0.025) nprobw(x,n=100)
x <- calSize(s=10,c=3,maxWave=9,rr=0.3,bruteMC=FALSE,tol=0.025) nprobw(x,n=100)