cleaned up ASDF for data module, which is used by user package and unittests.
[CommonLispStat.git] / Data / aircraft.lsp
blobf553b39c922232d8d37919aa56e80605346d7dce
1 (require "maximize")
3 (def failure-times
4 '((413 14 58 37 100 65 9 169 447 184 36 201 118 34 31
5 18 18 67 57 62 7 22 34)
6 (90 10 60 186 61 49 14 24 56 20 79 84 44 59 29 118 25 156
7 310 76 26 44 23 62 130 208 70 101 208)
8 (74 57 48 29 502 12 70 21 29 386 59 27 153 26 326)
9 (55 320 65 104 220 239 47 246 176 182 33 15 104 35)
10 (23 261 87 7 120 14 62 47 225 71 246 21 42 20 5 12 120
11 11 3 14 71 11 14 11 16 90 1 16 52 95)))
13 (def x (select failure-times 1))
15 (defun gllik (theta)
16 (let* ((mu (select theta 0))
17 (beta (select theta 1))
18 (n (length x))
19 (bym (* x (/ beta mu))))
20 (+ (* n (- (log beta) (log mu) (log-gamma beta)))
21 (sum (* (- beta 1) (log bym)))
22 (sum (- bym)))))