|
statcpp
C++17 Header-Only Statistics Library
|
Survival analysis functions. More...
#include <algorithm>#include <cmath>#include <cstddef>#include <limits>#include <numeric>#include <stdexcept>#include <vector>#include "statcpp/continuous_distributions.hpp"Go to the source code of this file.
Classes | |
| struct | statcpp::kaplan_meier_result |
| Kaplan-Meier estimation result. More... | |
| struct | statcpp::logrank_result |
| Log-rank test result. More... | |
| struct | statcpp::hazard_rate_result |
| Hazard rate result. More... | |
Namespaces | |
| namespace | statcpp |
Functions | |
| kaplan_meier_result | statcpp::kaplan_meier (const std::vector< double > ×, const std::vector< bool > &events) |
| Estimate Kaplan-Meier survival curve. | |
| logrank_result | statcpp::logrank_test (const std::vector< double > ×1, const std::vector< bool > &events1, const std::vector< double > ×2, const std::vector< bool > &events2) |
| Log-rank test (comparison of two survival curves) | |
| double | statcpp::median_survival_time (const kaplan_meier_result &km) |
| Calculate median survival time. | |
| hazard_rate_result | statcpp::nelson_aalen (const std::vector< double > ×, const std::vector< bool > &events) |
| Nelson-Aalen cumulative hazard estimation. | |
Survival analysis functions.
Provides functions for survival analysis including Kaplan-Meier estimation, Log-rank test, and Nelson-Aalen estimation.
Definition in file survival.hpp.