Releases: human-nature-lab/TSCSMethods.jl
Production release
TSCSMethods.jl v2.0.0
TSCSMethods.jl v2.0.0, is a major milestone that transforms this package from an experimental implementation into a production-ready statistical software package with validation, testing, and better code organization.
Statistical Validation & Reliability
See documentation for details on unit testing.
Complete Code Reorganization
The entire codebase has been restructured into logical subsystems for improved maintainability:
src/
├── core/ # Core types and model construction (2 files)
├── matching/ # Matching algorithms and utilities (9 files)
├── balancing/ # Balancing strategies and auto-balancing (7 files)
├── estimation/ # Treatment effect estimation and bootstrap (9 files)
├── advanced/ # Stratification, refinement, advanced features (3 files)
└── utilities/ # Helper functions, storage, inspection tools (7 files)
Testing Infrastructure
- Unit tests organized by subsystem in
test/unit/ - Integration tests for complete workflows in
test/integration/ - Statistical correctness tests in
test/correctness/ - Performance benchmarks in
test/benchmark/ - Automated validation gates for coverage and placebo testing
Complete Documentation
- Full API documentation with examples
- Statistical methodology explanations
- Tutorial notebooks and working examples
- Validation procedures and results
- Developer guidelines and contribution docs
Enhanced Statistical Features
Robust Matching System
- Mahalanobis distance matching with missing data handling
- Caliper constraints and refinement procedures
- Automated balancing with p-value optimization
- Support for time-varying and time-invariant covariates
Advanced Estimation
- Bootstrap-based inference with configurable iterations
- Stratified estimation for heterogeneous effects
- Multiple outcome support with simultaneous estimation
- Comprehensive result reporting with confidence intervals
Quality Assurance
- Input validation with informative error messages
- Type safety throughout the codebase
- Extensive parameter validation and bounds checking
- Memory-efficient algorithms for large datasets
Validation Results
This release includes comprehensive statistical validation, see documents.
(Breaking) Changes from v1.6
New Organized Structure
- File paths updated (old hardcoded paths will break)
- Test files reorganized by category
- Examples moved from
vignette/toexamples/ - Validation scripts moved to
validation/
Enhanced API Stability
- All exported functions remain the same
- Improved error messages and input validation
- More robust handling of edge cases
- Better memory management for large datasets
Dependency Updates
- Updated to support Julia 1.10+ with testing on 1.6, 1.10, 1.11 (earlier versions may work)
Quick Start
using TSCSMethods
# Load example data
data = example_data()
# Create model for causal inference
model = makemodel(
data, :day, :fips, :gub, :death_rte,
[:pop_dens], Dict(:pop_dens => false),
5:10, # F: post-treatment periods
-15:-10 # L: pre-treatment periods
)
# Complete workflow
match!(model, data) # Find matched control units
balance!(model, data) # Balance covariates
estimate!(model, data, dobayesfactor=false) # Estimate treatment effects
# Results
println("ATT: ", model.overall.ATT)
println("95% CI: [", model.overall.p05, ", ", model.overall.p95, "]")For Developers
New Development Commands
# Run all tests
julia --project=. -e "using Pkg; Pkg.test()"
# Run validation gates
julia --project=. validation/sim_bias_coverage.jl --seeds 20 --iterations 400
julia --project=. validation/placebo_permutation.jl --permutations 300 --iterations 100
# Build documentation
julia --project=docs/ docs/make.jlContributing
The new modular structure makes contributions easier:
- Clear separation of concerns across subsystems
- Comprehensive test coverage for new features
- Automated validation prevents regressions
- Detailed developer documentation
Performance & Reliability
- Memory optimized for large time-series cross-sectional datasets
- Numerically stable algorithms with extensive edge case handling
- Comprehensive error reporting with actionable error messages
- Statistical correctness verified through multiple validation frameworks
Documented version
This version extensively documents the prior version.
better version
This is the last version before the implementation of full-on handling of missing values
initial release
This is the initial full, publication-ready, version of the package.
Full Changelog: v0.2.0...v1.0.0
full sliding-window version
Full Changelog: v0.1.0...v0.2.0