|
statcpp
C++17 Header-Only Statistics Library
|
Resampling methods. More...
#include "statcpp/basic_statistics.hpp"#include "statcpp/dispersion_spread.hpp"#include "statcpp/order_statistics.hpp"#include "statcpp/continuous_distributions.hpp"#include "statcpp/random_engine.hpp"#include <algorithm>#include <cmath>#include <cstddef>#include <iterator>#include <numeric>#include <random>#include <stdexcept>#include <utility>#include <vector>Go to the source code of this file.
Classes | |
| struct | statcpp::bootstrap_result |
| Structure to store bootstrap estimation results. More... | |
| struct | statcpp::permutation_result |
| Structure to store permutation test results. More... | |
Namespaces | |
| namespace | statcpp |
Functions | |
| template<typename Iterator , typename Engine = default_random_engine> | |
| std::vector< typename std::iterator_traits< Iterator >::value_type > | statcpp::bootstrap_sample (Iterator first, Iterator last, Engine &engine) |
| Generate a single bootstrap sample. | |
| template<typename Iterator > | |
| std::vector< typename std::iterator_traits< Iterator >::value_type > | statcpp::bootstrap_sample (Iterator first, Iterator last) |
| Generate a single bootstrap sample (using default random engine) | |
| template<typename Iterator , typename Statistic , typename Engine = default_random_engine> | |
| bootstrap_result | statcpp::bootstrap (Iterator first, Iterator last, Statistic stat_func, std::size_t n_bootstrap=1000, double confidence=0.95, Engine &engine=get_random_engine()) |
| Perform general bootstrap estimation. | |
| template<typename Iterator , typename Engine = default_random_engine> | |
| bootstrap_result | statcpp::bootstrap_mean (Iterator first, Iterator last, std::size_t n_bootstrap=1000, double confidence=0.95, Engine &engine=get_random_engine()) |
| Perform bootstrap estimation of the mean. | |
| template<typename Iterator , typename Engine = default_random_engine> | |
| bootstrap_result | statcpp::bootstrap_median (Iterator first, Iterator last, std::size_t n_bootstrap=1000, double confidence=0.95, Engine &engine=get_random_engine()) |
| Perform bootstrap estimation of the median. | |
| template<typename Iterator , typename Engine = default_random_engine> | |
| bootstrap_result | statcpp::bootstrap_stddev (Iterator first, Iterator last, std::size_t n_bootstrap=1000, double confidence=0.95, Engine &engine=get_random_engine()) |
| Perform bootstrap estimation of the standard deviation. | |
| template<typename Iterator , typename Statistic , typename Engine = default_random_engine> | |
| bootstrap_result | statcpp::bootstrap_bca (Iterator first, Iterator last, Statistic stat_func, std::size_t n_bootstrap=1000, double confidence=0.95, Engine &engine=get_random_engine()) |
| Compute BCa (bias-corrected and accelerated) bootstrap confidence interval. | |
| template<typename Iterator1 , typename Iterator2 , typename Engine = default_random_engine> | |
| permutation_result | statcpp::permutation_test_two_sample (Iterator1 first1, Iterator1 last1, Iterator2 first2, Iterator2 last2, std::size_t n_permutations=10000, Engine &engine=get_random_engine()) |
| Perform two-sample permutation test (test of difference in means) | |
| template<typename Iterator1 , typename Iterator2 , typename Engine = default_random_engine> | |
| permutation_result | statcpp::permutation_test_paired (Iterator1 first1, Iterator1 last1, Iterator2 first2, Iterator2 last2, std::size_t n_permutations=10000, Engine &engine=get_random_engine()) |
| Perform paired permutation test. | |
| template<typename Iterator1 , typename Iterator2 , typename Engine = default_random_engine> | |
| permutation_result | statcpp::permutation_test_correlation (Iterator1 first1, Iterator1 last1, Iterator2 first2, Iterator2 last2, std::size_t n_permutations=10000, Engine &engine=get_random_engine()) |
| Perform permutation test for correlation. | |
Resampling methods.
Provides resampling methods including bootstrap, jackknife, and permutation tests. Can be used for standard error estimation of statistics, confidence interval calculation, and hypothesis testing.
Definition in file resampling.hpp.