criterium.stats documentation

bca-nonparametric

[data statistic size alpha rng-factory]

Non-parametric BCa estimate of a statistic on data. Size bootstrap samples are used. Confidence values are returned at the alpha normal quantiles. rng-factory is a method that returns a random number generator to use for the sampling.

An introduction to the bootstrap. Efron, B., & Tibshirani, R. J. (1993).

See http://lib.stat.cmu.edu/S/bootstrap.funs for Efron's original implementation.

bca-nonparametric-eval

[n size data z-alpha estimate samples jack-samples]

Calculate bootstrap values for given estimate and samples

bootstrap-estimate

[sampled-stat]

Mean, variance and confidence interval. This uses the bootstrapped statistic's variance for the confidence interval, but we should use BCa of ABC.

bootstrap-sample

[data statistic size rng-factory]

Bootstrap sampling of a statistic, using resampling with replacement.

boxplot-outlier-thresholds

[q1 q3]

Outlier thresholds for given quartiles.

confidence-interval

[mean variance]

Find the significance of outliers gicen boostrapped mean and variance estimates. This uses the bootstrapped statistic's variance, but we should use BCa of ABC.

cube

[x]

Square of argument

erf

[x]

erf polynomial approximation. Maximum error is 1.5e-7. Handbook of Mathematical Functions: with Formulas, Graphs, and Mathematical Tables. Milton Abramowitz (Editor), Irene A. Stegun (Editor), 7.1.26

gaussian-weight

[t]

Weight function for gaussian kernel.

jacknife

[data statistic]

Jacknife statistics on data.

kernel-density-estimator

[h K n X x]

Kernel density estimator for x, given n samples X, weights K and width h.

mean

[data]

Arithmetic mean of data.

median

[data]

Calculate the median of a sorted data set References: http://en.wikipedia.org/wiki/Median

modal-estimation-constant

[h-k sample-variance]

Kernel function for estimation of multi-modality. h-k is the critical bandwidth, sample-variance is the observed sample variance. Equation 7, Nonparametric assessment of multimodality for univariate data. Salgado-Ugarte IH, Shimizu M

normal-cdf

[x]

Probability p(X

normal-quantile

[x]

Normal quantile function. Given a quantile in (0,1), return the normal value for that quantile.

Wichura, MJ. 'Algorithm AS241' The Percentage Points of the Normal Distribution. Applied Statistics, 37, 477-484

polynomial-value

[x coefficients]

Evaluate a polynomial at the given value x, for the coefficients given in descending order (so the last element of coefficients is the constant term).

quantile

[quantile data]

Calculate the quantile of a sorted data set References: http://en.wikipedia.org/wiki/Quantile

quartiles

[data]

Calculate the quartiles of a sorted data set References: http://en.wikipedia.org/wiki/Quartile

sample

[x rng]

Sample with replacement.

sample-uniform

[n max-val rng]

Provide n samples from a uniform distribution on 0..max-val

smoothed-sample

[c-k h-k data deviates]

Smoothed estimation function.

sqr

[x]

Square of argument

sum

[data]

Sum of each data point.

sum-of-squares

[data]

Sum of the squares of each data point.

transpose

[data]

Transpose a vector of vectors.

trunc

[x]

Round towards zero to an integeral value.

uniform-distribution

[max-val rng]

Return uniformly distributed deviates on 0..max-val use the specified rng.

variance

[data]
[data df]

Sample variance. Returns variance. Ref: Chan et al. Algorithms for computing the sample variance: analysis and recommendations. American Statistician (1983).