Bootstrap resampling and confidence interval estimation.
Provides core bootstrap algorithms for statistical inference:
References:
Bootstrap resampling and confidence interval estimation. Provides core bootstrap algorithms for statistical inference: - bootstrap-sample: Resampling with replacement - bootstrap-estimate: Mean, variance and confidence intervals - jacknife: Leave-one-out resampling - bca-nonparametric: Bias-corrected and accelerated bootstrap - bootstrap-bca: Bootstrap with BCa confidence intervals References: - Efron, B., & Tibshirani, R. J. (1993). An introduction to the bootstrap. - http://lib.stat.cmu.edu/S/bootstrap.funs
(assoc-bootstrap-mean-3-sigma {:keys [mean variance] :as stats})Add :mean-plus-3sigma and :mean-minus-3sigma to stats map.
Add :mean-plus-3sigma and :mean-minus-3sigma to stats map.
(bca-nonparametric data statistic size alpha rng-factory)Non-parametric BCa estimate of a statistic on data.
Data must be a DoubleArray or sequence (converted to DoubleArray). The statistic function receives a sorted DoubleArray.
Size bootstrap samples are used. Confidence values are returned at the alpha normal quantiles. rng-factory is a function that returns a random number generator to use for the sampling.
References:
Non-parametric BCa estimate of a statistic on data. Data must be a DoubleArray or sequence (converted to DoubleArray). The statistic function receives a sorted DoubleArray. Size bootstrap samples are used. Confidence values are returned at the alpha normal quantiles. rng-factory is a function that returns a random number generator to use for the sampling. References: - An introduction to the bootstrap. Efron, B., & Tibshirani, R. J. (1993). - http://lib.stat.cmu.edu/S/bootstrap.funs for Efron's original implementation.
(bca-nonparametric-eval size z-alpha estimate samples jack-samples)Calculate bootstrap values for given estimate and samples.
Internal function used by bca-nonparametric. samples and jack-samples are sequences of statistic values.
Calculate bootstrap values for given estimate and samples. Internal function used by bca-nonparametric. samples and jack-samples are sequences of statistic values.
(bootstrap data statistic size rng-factory)Bootstrap a statistic.
Statistic can produce multiple statistics as a vector, so you can use juxt to pass multiple statistics.
Returns [mean variance [lower upper]] for each statistic.
See: http://en.wikipedia.org/wiki/Bootstrapping_(statistics)
Bootstrap a statistic. Statistic can produce multiple statistics as a vector, so you can use juxt to pass multiple statistics. Returns [mean variance [lower upper]] for each statistic. See: http://en.wikipedia.org/wiki/Bootstrapping_(statistics)
(bootstrap-bca data statistic size alpha rng-factory)Bootstrap a statistic with BCa confidence intervals.
Statistic can produce multiple statistics as a vector, so you can use juxt to pass multiple statistics.
Returns a BcaEstimate record with :point-estimate and :estimate-quantiles.
See: http://en.wikipedia.org/wiki/Bootstrapping_(statistics)
Bootstrap a statistic with BCa confidence intervals. Statistic can produce multiple statistics as a vector, so you can use juxt to pass multiple statistics. Returns a BcaEstimate record with :point-estimate and :estimate-quantiles. See: http://en.wikipedia.org/wiki/Bootstrapping_(statistics)
(bootstrap-estimate sampled-stat)Mean, variance and confidence interval from bootstrapped samples.
sampled-stat is a sequence of statistic values (converted to DoubleArray).
Returns [mean variance [lower upper]] where the confidence interval uses the bootstrapped statistic's variance.
Mean, variance and confidence interval from bootstrapped samples. sampled-stat is a sequence of statistic values (converted to DoubleArray). Returns [mean variance [lower upper]] where the confidence interval uses the bootstrapped statistic's variance.
(bootstrap-sample data statistic size rng-factory)Bootstrap sampling of a statistic, using resampling with replacement.
Data must be a DoubleArray or sequence (converted to DoubleArray). The statistic function receives a sorted DoubleArray.
Returns transposed results: if statistic returns a vector, returns a vector of vectors where each inner vector contains all samples for that statistic.
Bootstrap sampling of a statistic, using resampling with replacement. Data must be a DoubleArray or sequence (converted to DoubleArray). The statistic function receives a sorted DoubleArray. Returns transposed results: if statistic returns a vector, returns a vector of vectors where each inner vector contains all samples for that statistic.
(drop-at n coll)Return coll with element at index n removed.
Return coll with element at index n removed.
(jacknife data statistic)Jacknife statistics on data.
Data must be a DoubleArray or sequence (converted to DoubleArray). The statistic function receives a DoubleArray.
Computes the statistic on each leave-one-out sample of the data. Returns transposed results like bootstrap-sample.
Jacknife statistics on data. Data must be a DoubleArray or sequence (converted to DoubleArray). The statistic function receives a DoubleArray. Computes the statistic on each leave-one-out sample of the data. Returns transposed results like bootstrap-sample.
(scale-bootstrap-estimate estimate scale)Scale a BcaEstimate by the given scale factor.
Scale a BcaEstimate by the given scale factor.
(scale-bootstrap-stat scale-f stat)Scale a bootstrap stat using the given scale function.
Scale a bootstrap stat using the given scale function.
(scale-bootstrap-values stats f)Apply function f to all values in stats map.
Apply function f to all values in stats map.
(stats-fn fs)Combine multiple stat functions into one that returns a vector of results.
Combine multiple stat functions into one that returns a vector of results.
Map of stat keywords to their corresponding functions.
Map of stat keywords to their corresponding functions.
(stats-fns quantiles)Build vector of stat functions including quantile functions for given quantiles.
Build vector of stat functions including quantile functions for given quantiles.
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |