Skip to content

Instantly share code, notes, and snippets.

@liebke
Created April 20, 2009 19:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save liebke/98705 to your computer and use it in GitHub Desktop.
Save liebke/98705 to your computer and use it in GitHub Desktop.
(use '(incanter core datasets stats bayes charts))
(def survey-data (to-matrix (get-dataset :survey)))
(def x (sel survey-data (range 0 2313) (range 1 10)))
(def y (sel survey-data (range 0 2313) 10))
(def sample-params (sample-model-params 5000 (linear-model y x :intercept false)))
(view (trace-plot (:var sample-params)))
(view (trace-plot (sel (:coefs sample-params) :cols 0)))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment