statistics-0.10.3.1: A library of statistical types, data, and functions

Portability | portable
Stability | experimental
Maintainer | bos@serpentine.com
Safe Haskell | None

Statistics.Resampling

Description

Resampling statistics.

Synopsis

- newtype Resample = Resample {
  - fromResample :: Vector Double
  }
- jackknife :: Estimator -> Sample -> Vector Double
- resample :: Gen (PrimState IO) -> [Estimator] -> Int -> Sample -> IO [Resample]

# Documentation

newtype Resample

A resample drawn randomly, with replacement, from a set of data points. Distinct from a normal array to make it harder for your humble author's brain to go wrong.

Constructors

Resample |

Fields

fromResample :: Vector Double

Instances

Eq Resample |
Show Resample |

jackknife :: Estimator -> Sample -> Vector Double

Compute a statistical estimate repeatedly over a sample, each time omitting a successive element.

resample

Arguments

:: Gen (PrimState IO) |
-> [Estimator] | Estimation functions.
-> Int | Number of resamples to compute.
-> Sample | Original sample.
-> IO [Resample] |

O(e*r*s) Resample a data set repeatedly, with replacement, computing each estimate over the resampled data.

This function is expensive; it has to do work proportional to e*r*s, where e is the number of estimation functions, r is the number of resamples to compute, and s is the number of original samples.

To improve performance, this function will make use of all available CPUs. At least with GHC 7.0, parallel performance seems best if the parallel garbage collector is disabled (RTS option `-qg`).