Jeromy Anglim's Notes

Assorted notes on statistics, R, psychological research, LaTeX, computing, etc. See also my primary blog for more substantive posts: jeromyanglim.blogspot.com
  • rss
  • archive

Tags:
  • R
  • LaTeX
  • Linux / Ubuntu
  • OSX
  • Jags
  • Tumblr

Previous Notes:
Main Blog:
  • Jags error: “unknown function: dunif”

    I encountered the beginner’s error:

    RUNTIME ERROR:
    Compilation error on line 17.
    Unknown function: dunif
    
    • What caused this?

    When I was updating some code to take a distribution rather than an assigned value, I forgot to update the relational operator from assignment to ‘distributed as’.

    Thus, this:

    Beta1 <- dunif(0, 1)
    

    needed to be this:

    Beta1 ~  dunif(0, 1)
    

    Thus, JAGS thought that dunif was a function rather than a distribution.

    • December 7, 2012 (10:20 am)
    • #@jags
  • comments powered by Disqus