Package Cl-Mathstats - internal and external symbols

Part of:

asdf-system cl-mathstats
See only external symbols
Package Cl-Mathstats uses the packages Common-Lisp, Metabang.Cl-Containers and Metabang.Utilities. It is also known as Metabang.Math. It has 821 total symbols and 137 external ones.

Condition

data-error
enormous-contingency-table
insufficient-data
no-data
not-binary-variables
unmatched-sequences
zero-standard-deviation
zero-variance

Class

anova-one-way-variables
anova-two-way-variables
anova-two-way-variables-unequal-cell-sizes
autocorrelation
composite-statistic
confidence-interval
confidence-interval-proportion
confidence-interval-t
confidence-interval-z
correlation
covariance
cross-correlation
d-test
data
data-length
interquartile-range
maximum
mean
median
minimum
mode
multiple-modes
quantile
range
significance
simple-statistic
skewness
standard-deviation
statistic
statistical-summary
t-significance
t-test
t-test-matched
t-test-one-sample
trimmed-mean
tukey-summary
variance
z-test-one-sample

Variable

*continous-data-window-divisor*
*continuous-variable-uniqueness-factor*
*create-statistical-objects*
*gaussian-cdf-signals-zero-standard-deviation-error*
*temporary-table*

A temporary table. This avoids consing.

*temporary-vector*

A temporary vector for use by statistical functions such as `quantile,' which
uses it for sorting...

*way-too-big-contingency-table-dimension*

Constant

+0degrees+
+10degrees+
+120degrees+
+135degrees+
+150degrees+
+15degrees+
+180degrees+
+210degrees+
+225degrees+
+240degrees+
+270degrees+
+300degrees+
+30degrees+
+315degrees+
+330degrees+
+360degrees+
+45degrees+
+5degrees+
+60degrees+
+90degrees+
+e+

An approximation of the constant e (named for Euler!).

+log-pi+
+sqrt-pi+
2fpi

The constant 2*pi, in single-float format. Using this constant avoid
run-time double-float conta...

fpi

The constant pi, in single-float format. Using this constant avoid
run-time double-float contagi...

Function

1-or-2d-arrayp
anova-one-way-groups

Performs a one-way analysis of variance (ANOVA) on the `data,' which should
be a sequence of sequ...

anova-one-way-variables

anova-one-way-variables (iv dv &optional (scheffe-tests-p t)
confidence-...

anova-one-way-variables-internal

See anova-one-way-variables

anova-two-way-groups

Calculates the analysis of variance when there are two factors that may
affect the dependent vari...

anova-two-way-variables

anova-two-way-variables (dv iv1 iv2)
Calculates the analysis of variance when there are two facto...

anova-two-way-variables-internal

See anova-two-way-variables

anova-two-way-variables-unequal-cell-sizes

anova-two-way-variables-unequal-cell-sizes (iv1 iv2 dv)
Calculates the analysis of variance when ...

anova-two-way-variables-unequal-cell-sizes-internal

See anova-two-way-variables-unequal-cell-sizes

autocorrelation

autocorrelation (sample max-lag &optional (min-lag 0))
Autocorrelation is merely a cross-correlat...

autocorrelation-internal

See autocorrelation

beta

Returns the value of the Beta function, defined in terms of the complete
gamma function, G, as: G...

beta-incomplete

This function is useful in defining the cumulative distributions for
Student's t and the F distri...

binomial-cdf

Suppose an event occurs with probability `p' per trial. This function
computes the probability o...

binomial-cdf-exact

This is an exact but computationally intensive form of the preferred
function, `binomial-cdf.'

binomial-coefficient

Returns the binomial coefficient, n' choose k,' as an integer. The result
may not be exactly c...

binomial-coefficient-exact

This is an exact but computationally intensive form of the preferred
function, `binomial-coeffici...

binomial-probability

Returns the probability of k' successes in n' trials, where at each trial
the probability of su...

binomial-probability-exact

This is an exact but computationally intensive form of the preferred
function, `binomial-probabil...

chi-square-2x2

Performs a chi-square test for independence of the two variables, v1&#39; and<br> v2.' These should be ...

chi-square-2x2-counts

Runs a chi-square test for association on a simple 2 x 2 table. If `yates'
is nil, the correctio...

chi-square-rxc

Performs a chi-square test for independence of the two variables, v1&#39; and<br> v2.' These should be ...

chi-square-rxc-counts

Calculates the chi-square statistic and corresponding p-value for the given
contingency table. T...

chi-square-significance

Computes the complement of the cumulative distribution function for a
Chi-square random variable ...

combination-count

Returns the number of combinations of n elements taken k at a time. Assumes valid
input.

confidence-interval

confidence-interval nil
nil

confidence-interval-internal
confidence-interval-proportion

confidence-interval-proportion (x n confidence)
Suppose we have a sample of n&#39; things and x' of...

confidence-interval-proportion-internal

See confidence-interval-proportion

confidence-interval-t

confidence-interval-t (data confidence)
Suppose you have a sample of 10 numbers and you want to c...

confidence-interval-t-internal

See confidence-interval-t

confidence-interval-t-summaries

This function is just like `confidence-interval-t,' except that instead of
its arguments being th...

confidence-interval-z

confidence-interval-z (data confidence)
Suppose you have a sample of 50 numbers and you want to c...

confidence-interval-z-internal

See confidence-interval-z

confidence-interval-z-summaries

This function is just like `confidence-interval-z,' except that instead of
its arguments being th...

correlation

correlation (sample1 sample2 &key start1 end1 start2 end2)
Computes the correlation coefficient o...

correlation-from-summaries

Computes the correlation of two variables given summary statistics of the
variables. All of thes...

correlation-internal

See correlation

correlation-matrix

Returns a matrix of all the correlations of all the variables. The dependent
variable is row and...

covariance

covariance (sample1 sample2 &key start1 end1 start2 end2)
Computes the covariance of two samples,...

covariance-internal

See covariance

cross-correlation

cross-correlation (sequence1 sequence2 max-lag &optional (min-lag 0))
Returns a list of the corre...

cross-correlation-internal

See cross-correlation

d-test

d-test (sample-1 sample-2 tails &key (times 1000) (h0mean 0))
Two-sample test for difference in m...

d-test-internal

See d-test

data-continuous-p
data-length

data-length (data &key start end key)
Returns the number of data values in `data.' Essentially, t...

data-length-internal

See data-length

degrees->radians

Convert degrees to radians.

difference-list

Takes a sequence of numbers and returns a sequence of differences
from the mean.
Formula: xi = X...

div2

Divide positive fixnum `i' by 2 or a power of 2, yielding an integer result.
For example, (div2 3...

ensure-float
error-function

Computes the error function, which is typically used to compute areas under
the Gaussian probabil...

error-function-complement

This function computes the complement of the error function, erfc(x),''
defined as 1-erf(x). S...

error-function-complement-short-1
error-function-complement-short-2
exp2

2^n

extract-unique-values

A faster version of `remove-duplicates'. Note you cannot specify a :TEST (it is always #'eq).

f-measure

Returns the f-measure, the combination of precision and recall based on
parameter beta - default ...

f-significance

This function occurs in the statistical test of whether two observed samples
have the same varian...

factorial

Returns the factorial of `n,' which should be a non-negative integer. The
result will returned a...

factorial-exact

Returns the factorial of `n,' which should be an integer. The result will
returned as an integer...

factorial-ln

Returns the natural logarithm of n!; `n' should be an integer. The result
will be a single-preci...

fill-2d-array
find-critical-value

Returns the critical value of some statistic. The function `p-function'
should be a unary functi...

g-test

Calculates the G-test for a contingency table. The formula for the
G-test statistic is

2 * sum[...

gamma-incomplete

This is an incomplete gamma function, what Numerical Recipes in C calls
gammp.'' This function ...

gamma-ln

Returns the natural logarithm of the Gamma function evaluated at `x.'
Mathematically, the Gamma f...

gaussian-cdf

Computes the cumulative distribution function for a Gaussian random variable
(defaults: mean=0.0,...

gaussian-significance

Computes the significance of x&#39; in a Gaussian distribution with mean= mean'
(default 0.0) and st...

inner-product

Returns the inner product of the two samples, which should be sequences of
numbers. The inner pr...

interquartile-range

interquartile-range (data)
The interquartile range is similar to the variance of a sample because...

interquartile-range-internal

See interquartile-range

invert-matrix

If matrix is singular returns nil, else returns its inverse.
If into-matrix is supplied, inver...

invert-matrix-iterate

If matrix is singular returns nil, else returns the inverse of matrix.
Uses iterative improvem...

lagged-correlation

Returns the correlations of sequence1&#39; with sequence2' after
shifting sequence1&#39; by lag'. Th...

linear-regression-brief

Calculates the main statistics of a linear regression: the slope and
intercept of the line, the c...

linear-regression-brief-summaries

Calculates the main statistics of a linear regression: the slope and
intercept of the line, the c...

linear-regression-minimal

Calculates the slope and intercept of the regression line. This function
takes two equal-length ...

linear-regression-minimal-summaries

Calculates the slope and intercept of the regression line. This function
differs from `linear-re...

linear-regression-verbose

Calculates almost every statistic of a linear regression: the slope and
intercept of the line, th...

linear-regression-verbose-summaries

Calculates almost every statistic of a linear regression: the slope and
intercept of the line, th...

linear-scale

Rescales value linearly from the old-min/old-max scale to the new-min/new-max one.

list-2d-array
log2

Log of `n' to base 2.

make-3d-table

Collects the dv&#39; values for each unique combination of an element of v1'
and an element of `v2....

make-contingency-table

Counts each unique combination of an element of v1&#39; and an element of v2.'
Returns a two-dimens...

matrix-addition
matrix-multiply

Does successive multiplications of each element in `args'. If two
elements are scalar, then thei...

matrix-norm

Returns the norm of matrix.
The norm is the maximum over the rows of the sum of the abs of the...

matrix-plus-matrix

Adds two matrices together

matrix-plus-scalar

Add a scalar value to a matrix

matrix-times-matrix

Multiplies two matrices together

matrix-times-scalar

Multiply a matrix by a scalar value

matrix-times-scalar!

Multiply a matrix by a scalar value

matrix-trace
maximum

maximum (data &key start end key)
Returns the element of the sequence data&#39; whose key' is maxim...

maximum-internal

See maximum

mean

mean (data &key start end key)
Returns the arithmetic mean of `data,' which should be a sequence....

mean-internal

See mean

median

median (data &key start end key)
Returns the median of the subsequence of data&#39; from start' to ...

median-internal

See median

minimum

minimum (data &key start end key)
Returns the element of the sequence data&#39; whose key' is minim...

minimum-internal

See minimum

mod2

Find `n' mod a power of 2.

mode

mode (data &key start end key)
Returns the most frequent element of `data,' which should be a seq...

mode-for-continuous-data

Returns the most frequent element of `data,' which should be a sequence. The
algorithm involves ...

mode-internal

See mode

multiple-linear-regression-arrays

This is an internal function for the use of the multiple-linear-regression
functions. It takes t...

multiple-linear-regression-brief

Let m be the number of independent variables, `ivs.' This function returns a
vector of length m w...

multiple-linear-regression-minimal

Let m be the number of independent variables, `ivs.' This function returns
a vector of length m ...

multiple-linear-regression-normal

Performs linear regression of the dependent variable, dv,&#39; on multiple<br> independent variables, i...

multiple-linear-regression-verbose

Let m be the number of independent variables, `ivs.' This function returns
fourteen values:
1. t...

multiple-modes

multiple-modes (data k &key start end key)
Returns the k&#39; most frequent elements of data,' whic...

multiple-modes-internal

See multiple-modes

multiply-matrices

Multiply matrices MATRIX-1 and MATRIX-2, storing into MATRIX-3 if supplied.
If MATRIX-3 is not su...

normalize-matrix

Returns a new matrix such that the sum of its elements is 1.0

on-interval

returns t iff x in the interval

partials-from-parents
permutation-count

Returns the number of possible ways of taking k elements out of n total.

poisson-cdf

Computes the cumulative distribution function for a Poisson random variable
with mean `x' evaluat...

print-anova-table

Prints anova-table&#39; on stream.'

print-scheffe-table

Prints scheffe-table&#39; on stream.' If the original one-way anova data had N
groups, the Scheffe ...

pythag-df

Computes square root of aa + b b without destructive overflow or underflow.

pythag-sf

Computes square root of aa + b b without destructive overflow or underflow.

quantile

quantile (data q &key start end key)
Returns the element which is the q'th percentile of the data...

quantile-internal

See quantile

r-score

Takes two sequences and returns the correlation coefficient.
Formula: Sum (Cross-product (Differ...

radians->degrees

Convert radians to degrees. Does not round the result.

range

range (data &key start end key)
Returns the range of the sequence data.&#39; Signals no-data' if th...

range-internal

See range

reduce-matrix

Uses the Gauss-Jordan reduction method to reduce a matrix.

remove-&rest

Removes the '&rest arg' part from a lambda-list (strictly for documentation purposes.

round-to-factor

Equivalent to (* factor (round n factor)). For example, `round-to-factor' of
65 and 60 is 60. U...

safe-exp

Eliminates floating point underflow for the exponential function.
Instead, it just returns 0.0d0

scalar-matrix-multiply

Multiplies a matrix by a scalar value in the form M[i,j] = s*M[i,j].

scheffe-tests

Performs all pairwise comparisons between group means, testing for
significance using Scheffe's F...

significance

significance nil
nil

significance-internal
singular-value-decomposition

Returns as three values the U W and V of singular value decomposition. If
you have already conse...

skewness

skewness (data &key start end key)
Returns the skewness of `data', which is the sum of cubed dist...

skewness-internal

See skewness

smart-mode
smooth-4253h

Smooths `data' by successive smoothing: 4,median; then 2,median; then
5,median; then 3,median; th...

smooth-hanning

Smooths `data' by replacing each element with the weighted mean of it and its
two neighbors. The...

smooth-mean-2

With a window of size two, the median and mean smooth functions are the
same.

smooth-mean-3

Smooths `data' by replacing each element with the mean of it and its two
neighbors. The ends are...

smooth-mean-4

Smooths `data' by replacing each element with the mean of it, its left
neighbor, and its two righ...

smooth-mean-5

Smooths `data' by replacing each element with the median of it, its two left
neighbors and its tw...

smooth-median-2

Smooths `data' by replacing each element with the median of it and its
neighbor on the left. A m...

smooth-median-3

Smooths `data' by replacing each element with the median of it and its two
neighbors. The ends a...

smooth-median-4

Smooths `data' by replacing each element with the median of it, its left
neighbor, and its two ri...

smooth-median-5

Smooths `data' by replacing each element with the median of it, its two left
neighbors and its tw...

square
standard-deviation

standard-deviation (data &key start end key)
Returns the standard deviation of `data,' which is j...

standard-deviation-internal

See standard-deviation

statistical-summary

statistical-summary (data &key start end key)
Compute the length, minimum, maximum, range, median...

statistical-summary-internal

See statistical-summary

students-t-significance

Student's distribution is much like the Gaussian distribution except with
heavier tails, dependin...

sum-list

Takes a sequence of numbers and returns their sum.
Formula: Sum(X).

sum-of-array-elements
sum-of-squares

Returns the sum of squared distances from the mean of data&#39;.<br> <br> Signals no-data' if there is no d...

svbksb-df

Solves A X = B for a vector X,&#39; where A is specified by the mxn array U, n'
vector W, and nxn m...

svbksb-sf

Solves A X = B for a vector X,&#39; where A is specified by the mxn array U, n'
vector W, and nxn m...

svd-back-substitute

Returns the solution vector to the Ax=b, where A has been decomposed into
u,&#39; w' and v&#39; by si...

svd-inverse-fast-df

Computes the inverse of a matrix that has been decomposed into u,&#39; w' and
`v' by singular value...

svd-inverse-fast-sf

Computes the inverse of a matrix that has been decomposed into u,&#39; w' and
`v' by singular value...

svd-inverse-slow-df

Computes the inverse of a matrix that has been decomposed into u,&#39; w' and
`v' by singular value...

svd-inverse-slow-sf

Computes the inverse of a matrix that has been decomposed into u,&#39; w' and
`v' by singular value...

svd-matrix-inverse

Use singular value decomposition to compute the inverse of `A.' If an exact
inverse is not possib...

svd-solve-linear-system

Returns solution of linear system matrix * solution = b-vector. Employs the
singular value decom...

svd-zero

If the relative magnitude of an element in w&#39; compared to the largest<br> element is less than thre...

svdcmp-df

Given an m&#39;x n' matrix `A,' this routine computes its singular value
decomposition, A = U W V^T....

svdcmp-sf

Given an m&#39;x n' matrix `A,' this routine computes its singular value
decomposition, A = U W V^T....

svdvar

Given v&#39; and w' as computed by singular value decomposition, computes the
covariance matrix amo...

svzero-df

If the relative magnitude of an element in w&#39; compared to the largest<br> element is less than thre...

svzero-sf

If the relative magnitude of an element in w&#39; compared to the largest<br> element is less than thre...

t-significance

t-significance nil
nil

t-significance-internal
t-test

t-test (sample-1 sample-2 &optional (tails both) (h0mean 0))
Returns the t-statistic for the diff...

t-test-internal

See t-test

t-test-matched

t-test-matched (sample1 sample2 &optional (tails both))
Returns the t-statistic for two matched s...

t-test-matched-internal

See t-test-matched

t-test-one-sample

t-test-one-sample (data tails &optional (h0-mean 0) &key start end key)
Returns the t-statistic f...

t-test-one-sample-internal

See t-test-one-sample

times2

Multiply `i' by a power of 2.

transpose-matrix
trimmed-mean

trimmed-mean (data percentage &key start end key)
Returns a trimmed mean of `data.' A trimmed mea...

trimmed-mean-internal

See trimmed-mean

trunc2

Truncate `n' to a power of 2.

truncate-to-factor

Equivalent to (* factor (truncate n factor)). For example,
`truncate-to-factor' of 65 and 60 is ...

tukey-summary

tukey-summary (data &key start end key)
Computes a Tukey five-number summary of the data. That i...

tukey-summary-internal

See tukey-summary

variance

variance (data &key start end key)
Returns the variance of data,&#39; that is, the sum-of-squares' ...

variance-internal

See variance

z-test-one-sample

z-test-one-sample (data tails &optional (h0-mean 0) (h0-std-dev 1) &key
start ...

z-test-one-sample-internal

See z-test-one-sample

Generic-Function

composite-statistic-p
convert
cross-product
dot-product

http://en.wikipedia.org/wiki/Dot_product

make-statistic
simple-statistic-p
statisticp

Macro

aref1
aref11
check-type-of-arg

Generate error if the value of ARG-NAME doesn't satisfy PREDICATE.
PREDICATE is a function name (...

define-statistic

In clasp, statistical objects have two parts, a class which stores the
various parts of the objec...

sign-df
sign-sf
start/end
underflow-goes-to-zero

Protects against floating point underflow errors and sets the value to 0.0 instead.

with-routine-error-handling
with-temp-table

Binds `temp' to a hash table.

with-temp-vector

Binds temp&#39; to a vector of length at least min-size.' It's a vector of
pointers and has a fill-...