Next: Plotting Functions Up: Selected Listing of Previous: Constructing and Modifying

## Basic Statistical Functions

• (bayes-model logpost mode &key scale data derivstep (verbose t) (quick t) (print t)) [Function]

LOGPOST computes the logposterior density. It should return the function, or a list of the function value and gradient, or a list of the function value, gradient and Hessian. MODE is an initial guess for the mode. SCALE and DERIVSTEP are used for numerical derivatives and scaling. VERBOSE controls printing of iteration information during optimization, PRINT controls printing of summary information. If QUICK is T the summary is based on first order approximations.

• (beta-cdf x alpha beta) [Function]

Returns the value of the Beta(ALPHA, BETA) distribution function at X. Vectorized.

• (beta-dens x alpha beta) [Function]

Returns the density at X of the Beta(ALPHA, BETA) distribution. Vectorized.

• (beta-quant p alpha beta) [Function]

Returns the P-th quantile of the Beta(ALPHA, BETA) distribution. Vectorized.

• (beta-rand n a b) [Function]

Returns a list of N beta(A, B) random variables. Vectorized.

• (binomial-cdf x n p) [Function]

Returns value of the Binomial(N, P) distribution function at X. Vectorized.

• (binomial-pmf k n p) [Function]

Returns value of the Binomial(N, P) pmf function at integer K. Vectorized.

• (binomial-quant x n p) [Function]

Returns x-th quantile (left continuous inverse) of Binomial(N, P) cdf. Vectorized.

• (binomial-rand k n p) [Function]

Returns list of K draws from the Binomial(N, P) distribution. Vectorized.

• (bivnorm-cdf x y r) [Function]

Returns the value of the standard bivariate normal distribution function with correlation R at (X, Y). Vectorized.

• (cauchy-cdf x) [Function]

Returns the value of the standard Cauchy distribution function at X. Vectorized.

• (cauchy-dens x) [Function]

Returns the density at X of the standard Cauchy distribution. Vectorized.

• (cauchy-quant p) [Function]

Returns the P-th quantile(s) of the standard Cauchy distribution. Vectorized.

• (cauchy-rand n) [Function]

Returns a list of N standard Cauchy random numbers. Vectorized.

• (chisq-cdf x df) [Function]

Returns the value of the Chi-Square(DF) distribution function at X. Vectorized.

• (chisq-dens x alpha) [Function]

Returns the density at X of the Chi-Square(DF) distribution. Vectorized.

• (chisq-quant p df) [Function]

Returns the P-th quantile of the Chi-Square(DF) distribution. Vectorized.

• (chisq-rand n df) [Function]

Returns a list of N Chi-Square(DF) random variables. Vectorized.

• (covariance-matrix &rest args) [Function]

Returns the sample covariance matrix of the data columns in ARGS. ARGS may consist of lists, vectors or matrices.

• (difference x) [Function]

Returns differences for a sequence X.

• (f-cdf x ndf ddf) [Function]

Returns the value of the F(NDF, DDF) distribution function at X. Vectorized.

• (f-dens x ndf ddf) [Function]

Returns the density at X of the F(NDF, DDF) distribution. Vectorized.

• (f-quant p ndf ddf) [Function]

Returns the P-th quantile of the F(NDF, DDF) distribution. Vectorized.

• (f-rand n d) [Function]

Returns a list of N F(NDF, DDF) random variables. Vectorized.

• (fivnum number-data) [Function]

Returns the five number summary (min, 1st quartile, medinan, 3rd quartile, max) of the elements X.

• (gamma-cdf x alpha) [Function]

Returns the value of the Gamma(alpha, 1) distribution function at X. Vectorized.

• (gamma-dens x alpha) [Function]

Returns the density at X of the Gamma(ALPHA, 1) distribution. Vectorized.

• (gamma-quant p alpha) [Function]

Returns the P-th quantile of the Gamma(ALPHA, 1) distribution. Vectorized.

• (gamma-rand n a) [Function]

Returns a list of N Gamma(A, 1) random variables. Vectorized.

• (interquartile-range number-data) [Function]

Returns the interquartile range of the elements of X.

• (mean x) [Function]

Returns the mean of the elements x. Vector reducing.

• (median x) [Function]

Returns the median of the elements of X.

• (newtonmax f start &key scale derivstep (verbose 1) return-derivs) [Function]

Maximizes F starting from START using Newton's method with backtracking. If RETURN-DERIVS is NIL returns location of maximum; otherwise returns list of location, unction value, gradient and hessian at maximum. SCALE should be a list of the typical magnitudes of the parameters. DERIVSTEP is used in numerical derivatives and VERBOSE controls printing of iteration information. COUNT-LIMIT limits the number of iterations

• (nelmeadmax f start &key (size 1) (epsilon (sqrt machine-epsilon)) (count-limit 500) (verbose t) alpha beta gamma delta) [Function]

Maximizes F using the Nelder-Mead simplex method. START can be a starting simplex - a list of N+1 points, with N=dimension of problem, or a single point. If start is a single point you should give the size of the initial simplex as SIZE, a sequence of length N. Default is all 1's. EPSILON is the convergence tolerance. ALPHA-DELTA can be used to control the behavior of simplex algorithm.

• (normal-cdf x) [Function]

Returns the value of the standard normal distribution function at X. Vectorized.

• (normal-dens x) [Function]

Returns the density at X of the standard normal distribution. Vectorized.

• (normal-quant p) [Function]

Returns the P-th quantile of the standard normal distribution. Vectorized.

• (normal-rand n) [Function]

Returns a list of N standard normal random numbers. Vectorized.

• (nreg-model mean-function y theta &key (epsilon 0.0001) (count-limit 20) (print t) parameter-names response-name case-labels weights included (vetbose print)) [Function]

Fits nonlinear regression model with MEAN-FUNCTION and response Y using initial parameter guess THETA. Returns model object.

• (numgrad f x &optional scale derivstep) [Function]

Computes the numerical gradient of F at X.

• (numhess f x &optional scale derivstep) [Function]

Computes the numerical Hessian matrix of F at X.

• (oneway-model data &key (print t)) [Function]

DATA: list of compound-data Example:

• (order x) [Function]

Returns a sequence of the indices of elements in the sequence of numbers or strings X in order.

• (pmin &rest items) [Function]

Parallel minimum of ITEMS. Vectorized.

• (pmax &rest items) [Function]

Parallel maximum of ITEMS. Vectorized.

• (poisson-cdf x mu) [Function]

Returns value of the Poisson(MU) distribution function at X. Vectorized.

• (poisson-pmf k mu) [Function]

Returns value of the Poisson(MU) pmf function at integer K. Vectorized.

• (poisson-quant x mu) [Function]

Returns x-th quantile (left continuous inverse) of Poisson(MU) cdf. Vectorized.

• (poisson-rand k mu) [Function]

Returns list of K draws from the Poisson(MU) distribution. Vectorized.

• (quantile x p) [Function]

Returns the P-th quantile(s) of sequence X. P can be a number or a sequence.

• (rank x) [Function]

Returns a sequence with the elements of the list or array of numbers or strings X replaced by their ranks.

Reads the data in FILE as COLS columns and returns a list of lists representing the columns.

Returns a list of all lisp objects in FILE. FILE can be a string or a symbol, in which case the symbol'f print name is used.

• (regression-model x y &key (intercept t) (print t) weights included predictor-names response-name case-labels) [Function]

X - list of independent variables or X matrix
Y - dependent variable
INTERCEPT - T to include (default), NIL for no intercept
PRINT - if not NIL print summary information
WEIGHTS - if supplied should be the same length as Y; error variances are
assumed to be inversely proportional to WEIGHTS
PREDICTOR-NAMES
RESPONSE-NAME
CASE-LABELS - sequences of strings or symbols
INCLUDED - if supplied should be the same length as Y, with elements nil
to skip a in computing estimates (but not in residual analysis)
Returns a regression model object. To examine the model further assign the result to a variable and send it messages. Example (data are in file absorbtion.lsp in the sample data directory/folder):
(def m (regression-model (list iron aluminum) absorbtion))
(send m :help)
(send m :plot-residuals)

• (sort-data sequence) [Function]

Returns a sequence with the numbers or strings in the sequence X in order.

• (standard-deviation x) [Function]

Returns the standard deviation of the elements x. Vector reducing.

• (t-cdf x df) [Function]

Returns the value of the T(DF) distribution function at X. Vectorized.

• (t-dens x alpha) [Function]

Returns the density at X of the T(DF) distribution. Vectorized.

• (t-quant p df) [Function]

Returns the P-th quantile of the T(DF) distribution. Vectorized.

• (t-rand n d) [Function]

Returns a list of N T(DF) random variables. Vectorized.

• (uniform-rand n) [Function]

Returns a list of N uniform random variables from the range (0, 1). Vectorized.

Next: Plotting Functions Up: Selected Listing of Previous: Constructing and Modifying

Luke Tierney
Tue Jan 21 15:04:48 CST 1997