   [coll]
   (apply (partial map vector) coll))
 
+(defn outer-product
+  "returns a flattened vector of the outer product of a vector and its
+  transpose"
+  [coll]
+  (let [mat (i/matrix coll)]
+    (flatten (i/mmult mat (i/trans mat)))))
+
 (defn element-sum
   "returns a vector of sums of each respective element in a vector of vectors,
   i.e., a vector with the first element being the sum of the first

  to do."
  [y long-block short-block & x]
  (let [characteristics (create-struct :short :long :long-tstat :break)
        [long-val long-tstat] (apply long-stats y x)]
    (struct characteristics
            (min-short-trend long-block short-block y)
            long-val
            long-tstat
            (apply hansen-stat y x))))

(defn scaled-vector
  [scalar coll]

  TODO: remove redundancy, keep readability"
  [y & x]
  (let [foc (apply first-order-conditions y x)]
    [(element-sum (map outer-product (transpose foc)))
     (element-sum (map outer-product (transpose (map i/cumulative-sum foc))))]))

(defn hansen-stat
  "returns the Hansen (1992) test statistic; number of first-order
