How onsdigital/statistical-methods-library works
Main Components
a. Core Statistical Modules:
• Estimation Module
• Imputation Module
• Outliering Module
• Utilities Module
b. Testing Infrastructure:
• Test Fixtures
• Methodology Test Scenarios
• Unit Tests
┌─────────────────────────────────────────────┐
• Statistical Methods API │
• ┘
┌─────────────┐ ┌─────────────┐ ┌─────────────┐
• Estimation │ │ Imputation │ │ Outliering │
• Module │ │ Module │ │ Module │
• ┘ └─────────────┘ └─────────────┘
┌─────────────────────────────────────────────┐
• Utilities Module │
• (Exceptions, Validation, Period Handling) │
• ┘
Detailed Component Breakdown
Estimation Module:
• HT Ratio calculations
• Statistical estimations
Imputation Module:
• Engine component
• Ratio calculators
• Mean of ratios
• Ratio of means
Outliering Module:
• Winsorisation implementation
• Outlier detection and handling
Utilities Module:
• Exception handling
• Period management
• Validation utilities
Testing Infrastructure (shown as a separate connected component)
┌─────────────────────────────────────────────┐
• Testing Framework │
• ┌─────────────┐ ┌─────────────┐ │
• Unit Tests │ │ Methodology │ │
• Scenarios │ │
• ┘ └─────────────┘ │
• ┘
Additional Elements
• Configuration management (TOML files)
• CI/CD integration points
• Documentation references
┌─────────────────────────┐
• → Direct Dependency │
• ⇢ Optional Dependency │
• ↔ Two-way Interaction │
• ┘