Title: | 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. |
Authors: | Mamadou Yauck [aut, cre], Erica E. M. Moodie [aut] |
Maintainer: | Mamadou Yauck <[email protected]> |
License: | GPL-3 |
Version: | 1.0.1 |
Built: | 2024-11-05 06:38:40 UTC |
Source: | CRAN |
This function estimate standard errors and compute confidence intervals from an RDS sample using the neighborhood bootstrap method.
neighb(RDS.data, quant=c(0.025, 0.975), method=c("percentile","Wald"), B=1000)
neighb(RDS.data, quant=c(0.025, 0.975), method=c("percentile","Wald"), B=1000)
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. |
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.
A matrix of estimated standard errors and quantiles. Each row represents a trait.
Mamadou Yauck <[email protected]> and Erica E. M. Moodie.
#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)
#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
pop.network
pop.network
A list containing two elements:
traits
a dataframe of 2000 rows and 4 columns
adj.mat
an adjacency matrix
sample.RDS
object to an rds.data.frame
object.This function transforms an output from the sample.RDS
function of the
RDStreeboot package to an rds.data.frame
object of the
RDS package.
to.rds(RDS.data)
to.rds(RDS.data)
RDS.data |
A list containing the following objects:
|
An rds.data.frame
object.
Mamadou Yauck <[email protected]> and Erica E. M. Moodie.
#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)
#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)