1.2.3-SNAPSHOT Arrow_down_16x16

sample-t

incanter.stats

  • (sample-t size & options)
Returns a sample of the given size from a Student's t distribution.
Same as R's rt function.

Options:
:df (default 1)

See also:
pdf-t, cdf-t, and quantile-t

References:
http://incanter.org/docs/parallelcolt/api/cern/jet/random/tdouble/StudentT.html
http://en.wikipedia.org/wiki/Student-t_distribution

Example:
(cdf-t 1000 :df 10)

0 Examples top

Log in to add / edit an example.

See Also top

Log in to add a see also.

Plus_12x12 Minus_12x12 Source incanter/stats.clj:831 top

(defn sample-t
" Returns a sample of the given size from a Student's t distribution.
  Same as R's rt function.

  Options:
    :df (default 1)

  See also:
      pdf-t, cdf-t, and quantile-t

  References:
      http://incanter.org/docs/parallelcolt/api/cern/jet/random/tdouble/StudentT.html
      http://en.wikipedia.org/wiki/Student-t_distribution

  Example:
      (cdf-t 1000 :df 10)
"
  ([size & options]
    (let [opts (when options (apply assoc {} options))
          df (or (:df opts) 1)]
      (if (= size 1)
        (StudentT/staticNextDouble df)
        (for [_ (range size)] (StudentT/staticNextDouble df))))))
Vars in incanter.stats/sample-t: = defn for let
Used in 0 other vars

Comments top

No comments for sample-t. Log in to add a comment.