Array tests, version 1. Needs work. Examples to ls-demo
[CommonLispStat.git] / ls-user.lisp
blob86fdd1a7fce0be8b08f9b88d57948aabaa4f2b8e
1 ;;; -*- mode: lisp -*-
2 ;;; Copyright (c) 2005--2007, by A.J. Rossini <blindglobe@gmail.com>
3 ;;; See COPYRIGHT file for any additional restrictions (BSD license).
4 ;;; Since 1991, ANSI was finally finished. Edited for ANSI Common Lisp.
6 (defpackage :lisp-stat
7 (:documentation "Experimentation package for LispStat. Serious work
8 should be packaged up elsewhere for reproducibility.")
9 (:use :common-lisp
10 :lisp-stat-object-system
11 :lisp-stat-compound-data
12 :lisp-stat-probability
13 :lisp-stat-types
14 :lisp-stat-float
15 :lisp-stat-basics
16 :lisp-stat-data
17 :lisp-stat-math
18 :lisp-stat-matrix
19 :lisp-stat-linalg
20 :lisp-stat-descriptive-statistics
21 :lisp-stat-regression-linear)
22 (:shadowing-import-from :lisp-stat-object-system
23 slot-value call-method call-next-method)
24 (:shadowing-import-from :lisp-stat-math
25 expt + - * / ** mod rem abs 1+ 1- log exp sqrt sin cos tan
26 asin acos atan sinh cosh tanh asinh acosh atanh float random
27 truncate floor ceiling round minusp zerop plusp evenp oddp
28 < <= = /= >= > ;;complex
29 conjugate realpart imagpart phase
30 min max logand logior logxor lognot ffloor fceiling
31 ftruncate fround signum cis)
32 (:export
33 ;; lsobjects :
34 defproto defmeth send
36 ;; lstypes :
37 fixnump check-nonneg-fixnum check-one-fixnum
38 check-one-real check-one-number
40 ;; lsmacros:
42 ;; lsfloat :
43 machine-epsilon
45 ;; compound :
46 compound-data-p *compound-data-proto* compound-object-p
47 compound-data-seq compound-data-length
48 element-list element-seq
49 sort-data order rank
50 recursive-map-elements map-elements
51 repeat
52 check-sequence
53 get-next-element make-next-element set-next-element
54 sequencep iseq
55 ordered-nneg-seq
56 select which
57 difference rseq
59 ;; lsmath.lsp
60 ^ ** expt + - * / mod rem pmin pmax abs 1+ 1- log exp sqrt sin cos
61 tan asin acos atan sinh cosh tanh asinh acosh atanh float random
62 truncate floor ceiling round minusp zerop plusp evenp oddp < <= =
63 /= >= > ;; complex
64 conjugate realpart imagpart phase min max
65 logand logior logxor lognot ffloor fceiling ftruncate fround
66 signum cis
68 ;; matrices.lisp
69 matrixp num-rows num-cols matmult identity-matrix diagonal row-list
70 column-list inner-product outer-product cross-product transpose
71 bind-columns bind-rows
73 ;; linalg.lisp
74 chol-decomp lu-decomp lu-solve determinant inverse
75 sv-decomp qr-decomp rcondest make-rotation spline
76 kernel-dens kernel-smooth
77 fft make-sweep-matrix sweep-operator ax+y eigen
78 check-real
79 covariance-matrix matrix print-matrix solve
80 backsolve eigenvalues eigenvectors accumulate cumsum combine
81 lowess
83 ;; in linalg.lisp, possibly not supported by matlisp
84 spline kernel-dens kernel-smooth
86 ;; optimize.lsp
87 newtonmax nelmeadmax
89 ;; lispstat-macros
90 make-rv-function make-rv-function-1
92 ;; data.lisp
93 open-file-dialog read-data-file read-data-columns load-data
94 load-example *variables* *ask-on-redefine*
95 def variables savevar undef
97 ;; statistics.lsp
98 standard-deviation quantile median interquartile-range
99 fivnum sample
101 ;; dists
102 log-gamma set-seed
103 uniform-rand normal-cdf normal-quant normal-dens
104 normal-rand bivnorm-cdf cauchy-cdf cauchy-quant cauchy-dens
105 cauchy-rand gamma-cdf gamma-quant gamma-dens gamma-rand
106 chisq-cdf chisq-quant chisq-dens chisq-rand beta-cdf beta-quant
107 beta-dens beta-rand t-cdf t-quant t-dens t-rand f-cdf f-quant
108 f-dens f-rand poisson-cdf poisson-quant poisson-pmf poisson-rand
109 binomial-cdf binomial-quant binomial-pmf binomial-rand
111 ;;; Here is where we have a problem -- lispstat core should be core
112 ;;; data management and config problems, with packages providing
113 ;;; specialized extensions to LispStat, i.e. regression, nonlin
114 ;;; regression, bayesian regression via laplace approximation, etc.
116 ;;; The following could be considered "recommended packages", similar
117 ;;; to the idea of the recommended packages in R.
119 ;; regression.lsp
120 regression-model regression-model-proto x y intercept sweep-matrix
121 basis weights included total-sum-of-squares residual-sum-of-squares
122 predictor-names response-name case-labels
124 ;; nonlin.lsp
125 nreg-model nreg-model-proto mean-function theta-hat epsilon
126 count-limit verbose
128 ;; bayes.lsp
129 bayes-model bayes-model-proto bayes-internals))
131 (defpackage :lisp-stat-user
132 (:documentation "Experimentation package for LispStat.
133 Serious work should be placed in a similar package elsewhere for
134 reproducibility. But this should hint as to what needs to be
135 done for a user- or analysis-package.")
136 (:nicknames :ls-user)
137 (:use :common-lisp
138 :lisp-stat)
139 (:shadowing-import-from :lisp-stat
140 slot-value call-method call-next-method
142 expt + - * / ** mod rem abs 1+ 1- log exp sqrt sin cos tan
143 asin acos atan sinh cosh tanh asinh acosh atanh float random
144 truncate floor ceiling round minusp zerop plusp evenp oddp
145 < <= = /= >= > > ;; complex
146 conjugate realpart imagpart phase
147 min max logand logior logxor lognot ffloor fceiling
148 ftruncate fround signum cis
150 <= float imagpart))