treeboot.RDS: Estimate RDS Quantiles

Description Usage Arguments Details Value Author(s) References Examples

Description

This function estimates quantiles of numerical traits from a respondent-driven sample (RDS) using the tree bootstrap method.

Usage

1
treeboot.RDS(samp, quant, B)

Arguments

samp

A list with four components:

nodes

a vector of numbers, the ID numbers of the sampled nodes.

edges

a list of two vectors of positive integers, the edge list of the RDS. For each edge, node1 lists the respondent (source) nodes and node2 lists the recruited (destination) nodes.

degree

a vector of positive integers, the degree of each sampled node in the underlying social network.

traits

a data frame, the columns giving continuous or discrete (not categorical) traits for each node.

quant

a vector of numbers between 0 and 1, the quantiles to be estimated for each trait, with default c(0.025, 0.10, 0.90, 0.975).

B

a positive integer, the number of tree bootstrap samples to be drawn, with default 2000.

Details

The function treeboot.RDS estimates the quantiles of traits from a respondent-driven sample (RDS) using the tree bootstrap method. Options allow for different quantiles to be estimated and the number of tree bootstrap samples to be drawn.

Value

A matrix with one row for each trait in the RDS. Each row has a single computed quantile corresponding to the input vector quant.

Author(s)

Aaron J. Baraff

Maintainer: Aaron J. Baraff <ajbaraff at uw.edu>

References

Baraff, A. J., McCormick, T. H., and Raftery, A. E., "Estimating uncertainty in respondent-driven sampling using a tree bootstrap method."

Examples

1
2
3
4
5
6
7
8
## load data
data(faux.network)

## draw RDS from network
samp <- sample.RDS(faux.network$traits, faux.network$adj.mat, 100, 2, 3, c(0,1/3,1/3,1/3), TRUE)

## estimate 80% and 95% confidence intervals
treeboot.RDS(samp, c(0.025, 0.10, 0.90, 0.975), 2000)

Example output

      0.025       0.1        0.9      0.975
X 0.1791863 0.2223866 0.40791034 0.46104260
Y 0.0000000 0.0000000 0.04265729 0.06604178
Z 0.1271268 0.1690338 0.34732846 0.41175285

RDStreeboot documentation built on May 2, 2019, 6:47 a.m.