File: fstat.lsp

package info (click to toggle)
xlispstat 3.52.0-3
  • links: PTS
  • area: main
  • in suites: hamm, slink
  • size: 7,472 kB
  • ctags: 12,480
  • sloc: ansic: 89,534; lisp: 21,690; sh: 1,525; makefile: 520; csh: 1
file content (10 lines) | stat: -rw-r--r-- 295 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
(defun f-statistic (m1 m2)
"
Args: (m1 m2)
Computes the F statistic for testing model m1 within model m2."
  (let ((ss1 (send m1 :sum-of-squares))
        (df1 (send m1 :df))
        (ss2 (send m2 :sum-of-squares))
        (df2 (send m2 :df)))
    (/ (/ (- ss1 ss2) (- df1 df2)) (/ ss2 df2))))