RDS Tools Documentation

RDS Tools is a Python package for Respondent-Driven Sampling (RDS) analysis and bootstrap resampling with parallel processing capabilities.

Contents

Key Features

Data Processing
  • RDSdata() - Process RDS survey data and create network structure

  • Automatic wave detection and seed identification

  • Flexible degree imputation methods (mean, median, hotdeck, drop)

Estimation
  • RDSmean() - Calculate means with RDS-adjusted standard errors

  • RDStable() - Generate one-way and two-way frequency tables

  • RDSlm() - Linear regression models (numeric outcome)

  • RDSglm() - Logistic regression models (binary outcome)

  • Weighted and unweighted analyses

  • Naive and bootstrap variance estimation

Bootstrap Variance
  • RDSboot() - Three bootstrap resampling methods

  • RDSBootOptimizedParallel() - Parallel bootstrap for performance

  • Chain, tree unidirectional, and tree bidirectional methods

Visualization
  • RDSnetgraph() - Network visualizations with multiple layouts

  • RDSmap() - Interactive geographic maps

  • Helper functions: get_available_seeds(), get_available_waves(), print_map_info()

Performance
  • Parallel processing support with n_cores parameter

  • Up to 10x speedup with 8 cores

  • Optimized algorithms for large datasets

Indices and Tables