1.2.3-SNAPSHOT Arrow_down_16x16

pdf-chisq

incanter.stats

  • (pdf-chisq x & options)
Returns the Chi Square pdf of the given value of x. It will return a sequence
of values, if x is a sequence. Same as R's dchisq function.

Options:
:df (default 1)

See also:
cdf-chisq and sample-chisq

References:
http://incanter.org/docs/parallelcolt/api/cern/jet/random/tdouble/ChiSquare.html
http://en.wikipedia.org/wiki/Chi_square_distribution
http://en.wikipedia.org/wiki/Probability_density_function

Example:
(pdf-chisq 5.0 :df 2)

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:643 top

(defn pdf-chisq
" Returns the Chi Square pdf of the given value of x.  It will return a sequence
  of values, if x is a sequence. Same as R's dchisq function.

  Options:
    :df (default 1)

  See also:
      cdf-chisq and sample-chisq

  References:
      http://incanter.org/docs/parallelcolt/api/cern/jet/random/tdouble/ChiSquare.html
      http://en.wikipedia.org/wiki/Chi_square_distribution
      http://en.wikipedia.org/wiki/Probability_density_function

  Example:
      (pdf-chisq 5.0 :df 2)
"
  ([x & options]
    (let [opts (when options (apply assoc {} options))
          df (or (:df opts) 1)
          dist (ChiSquare. df (DoubleMersenneTwister.))]
      (if (coll? x)
        (map #(.pdf dist %) x)
        (.pdf dist x)))))
Vars in incanter.stats/pdf-chisq: coll? defn let map
Used in 0 other vars

Comments top

No comments for pdf-chisq. Log in to add a comment.