  3      2    [1 2 3 4 3 2 0] (roughly -1.25))
 
 (fact
+  "check expt-residuals"
   (let [y Yt
-        X (idx Yt)]))+        X (idx Yt)
+        power 2]
+    (last (expt-residuals y X power))) => 0.04430432657988476)
+
+(tabular
+ (fact
+   "check scaled-vector"
+   (scaled-vector ?scalar ?coll) => ?expected)
+ ?scalar ?coll ?expected
+ 1 [1 2 3] [1 2 3]
+ 2 [1 2 3] [2 4 6]
+ 1.5 [1 2 3] [1.5 3.0 4.5]
+ )
+
+(defn still-to-do
+  "long-stats
+   first-order-conditions
+   hansen-mats
+   trend-stats
+   harmonic-series
+   k-harmonic-matrix
+   harmonic-seasonal-decomposition
+  "
+
+  )

(ns forma.trends.analysis-test
  (:use [forma.trends.analysis] :reload)
  (:use midje.sweet
        [forma.presentation.ndvi-filter :only (ndvi reli rain Yt)])
  (:require [incanter.core :as i]

 [2 50] (roughly 48. 0.00000001))

(tabular
 "check min-short-trend"
 (fact
   (min-short-trend ?long ?short ?ts) => ?expected)
 ?long ?short ?ts ?expected
