home *** CD-ROM | disk | FTP | other *** search
- ; tech report pp. 61-65
-
- (require "data/leukemia")
-
- (def transformed-wbc-pos (- (log wbc-pos) (log 10000)))
- (defun llik-pos (theta)
- (let* ((x transformed-wbc-pos)
- (y times-pos)
- (theta0 (select theta 0))
- (theta1 (select theta 1))
- (tix (* theta1 x)))
- (- (sum tix)
- (* (length x) (log theta0))
- (/ (sum (* y (exp tix)))
- theta0))))
- (def lk (bayes-model #'llik-pos (list (exp 3.5) .8)))
- ;(plot-lines (send lk :margin1 0 (rseq 30 120 30)))
- (defun lk-sprob (theta)
- (let* ((time 52.0)
- (x (log 5))
- (mu (* (select theta 0) (exp (- (* (select theta 1) x))))))
- (exp (- (/ time mu)))))
- (plot-lines (send lk :margin1 #'lk-sprob (rseq .01 .8 30)))
-