Title: | Neighborhood Bootstrap Method for RDS |
Version: | 1.0.1 |
Date: | 2022-05-31 |
Author: | Mamadou Yauck [aut, cre], Erica E. M. Moodie [aut] |
Maintainer: | Mamadou Yauck <yauck.mamadou@uqam.ca> |
Description: | A bootstrap method for Respondent-Driven Sampling (RDS) that relies on the underlying structure of the RDS network to estimate uncertainty. |
License: | GPL-3 |
LazyData: | true |
RoxygenNote: | 7.2.0 |
Imports: | RDStreeboot, igraph, RDS, dplyr |
Depends: | R (≥ 2.10) |
Encoding: | UTF-8 |
NeedsCompilation: | no |
Packaged: | 2022-05-31 17:29:09 UTC; yauck_M |
Repository: | CRAN |
Date/Publication: | 2022-05-31 23:20:08 UTC |
Neighboot: Neighborhood Bootstrap Method for RDS
Description
A bootstrap method for Respondent-Driven Sampling (RDS) that relies on the underlying structure of the RDS network to estimate uncertainty.
Compute standard errors and confidence intervals
Description
This function estimate standard errors and compute confidence intervals from an RDS sample using the neighborhood bootstrap method.
Usage
neighb(RDS.data, quant=c(0.025, 0.975),
method=c("percentile","Wald"), B=1000)
Arguments
RDS.data |
A list containing the following objects:
|
quant |
a vector of positive integers between 0 and 1, representing quantiles to be estimated. |
method |
a character string representing the method for computing confidence intervals,
either |
B |
the number of bootstrap repetitions. Default is 1000. |
Details
The function neighb
compute standard errors and confidence intervals using
the neighborhood bootstrap method for RDS. Confidence intervals can be computed using
the percentile method or the studentized method.
Value
A matrix of estimated standard errors and quantiles. Each row represents a trait.
Author(s)
Mamadou Yauck <yauck.mamadou@uqam.ca> and Erica E. M. Moodie.
Examples
#Load the synthetic population network dataset.
data("pop.network")
#Draw an RDS sample from the simulated network using the sampleRDS function
#from the package RDStreeboot.
require(RDStreeboot)
RDS.samp <- sample.RDS(pop.network$traits, pop.network$adj.mat, 200, 10,
3, c(1/6,1/3,1/3,1/6), FALSE)
#Compute 95\% confidence intervals using the percentile method
neighb(RDS.data=RDS.samp, quant=c(0.025, 0.975),method="percentile", B=100)
Population network
Description
Population network
Usage
pop.network
Format
A list containing two elements:
traits
a dataframe of 2000 rows and 4 columns
adj.mat
an adjacency matrix
Tranform an sample.RDS
object to an rds.data.frame
object.
Description
This function transforms an output from the sample.RDS
function of the
RDStreeboot package to an rds.data.frame
object of the
RDS package.
Usage
to.rds(RDS.data)
Arguments
RDS.data |
A list containing the following objects:
|
Value
An rds.data.frame
object.
Author(s)
Mamadou Yauck <yauck.mamadou@uqam.ca> and Erica E. M. Moodie.
Examples
#Load the synthetic population network dataset.
data("pop.network")
#Draw an RDS sample from the simulated network using the sampleRDS function
#from the package RDStreeboot.
require(RDStreeboot)
RDS.samp <- sample.RDS(pop.network$traits, pop.network$adj.mat, 200, 10,
3, c(1/6,1/3,1/3,1/6), FALSE)
#Tranform RDS.samp to an rds.data.frame object
require(RDS)
to.rds(RDS.data=RDS.samp)