tag:blogger.com,1999:blog-3240271627873788873.post828775613818160485..comments2024-03-26T06:46:11.752-04:00Comments on Doing Bayesian Data Analysis: Graphical model diagrams in Doing Bayesian Data Analysis versus traditional conventionJohn K. Kruschkehttp://www.blogger.com/profile/17323153789716653784noreply@blogger.comBlogger15125tag:blogger.com,1999:blog-3240271627873788873.post-43483398463238055302015-06-17T02:40:55.622-04:002015-06-17T02:40:55.622-04:00Hey, what is the diagram software you used to crea...Hey, what is the diagram software you used to create these dagrams? It is <a href="http://creately.com" rel="nofollow">creately</a> ?Evanhttps://www.blogger.com/profile/01134034541170679170noreply@blogger.comtag:blogger.com,1999:blog-3240271627873788873.post-47475955045231489062012-12-05T20:24:05.570-05:002012-12-05T20:24:05.570-05:00Rasmus:
I posted the message below in the Nabble ...Rasmus:<br /><br />I posted the message below in the Nabble discussion forum, but thought I'd duplicate it here as a comment, too, just to be sure you (and others) see it:<br /><br />This is a terrific tool for helping to make attractive DBDA-style diagrams. Thanks very much for posting it!<br /><br />One way to make creation of diagrams much easier in LibreOffice is to use "glue points" on iconic distributions and equations, with "connectors" between the glue points. That way it is easy to rearrange the distributions with the connecting arrows remaining attached to the appropriate points in the icons. To do this, we have to manually add glue points to the iconic distributions in LibreOffice. While this is not terribly difficult, it is a bit inexact.<br /><br />So, I am wondering: Is there a way in R to produce the iconic distributions, perhaps in SVG format, that already includes glue points for LibreOffice at the top of each label in the in the graph? I do not know the SVG graphics language and do not know whether it includes specification of glue points, or if instead glue points are specific to LibreOffice.<br /><br />Thanks again! John K. Kruschkehttps://www.blogger.com/profile/17323153789716653784noreply@blogger.comtag:blogger.com,1999:blog-3240271627873788873.post-71234680925149643102012-10-15T07:42:01.339-04:002012-10-15T07:42:01.339-04:00Thanks for the feedback. I made the bars narrower ...Thanks for the feedback. I made the bars narrower and I fixed the black border bug. I also made <br /><a href="http://doing-bayesian-data-analysis.12272.n6.nabble.com/Tools-to-help-making-DBDA-diagrams-td5000529.html" rel="nofollow">a new thread</a> on the forum if people have more suggestions/find more bugs.<br /><br />/Rasmus<br />Rasmus Bååthhttps://www.blogger.com/profile/16575386339856902265noreply@blogger.comtag:blogger.com,1999:blog-3240271627873788873.post-67328510070824626632012-10-14T20:31:02.278-04:002012-10-14T20:31:02.278-04:00Dear Rasmus:
Very nice! Thanks for doing this and...<br />Dear Rasmus:<br /><br />Very nice! Thanks for doing this and thanks for letting us know.<br /><br />A few comments from after only a quick look:<br />* For the discrete distributions such as binomial, negative binomial, and so on, it would be better for the bars to be narrower so that bars look distinctly discrete, and the distribution does not look like a histogram over a continuous variable.<br />* When I display the binomial in a new window from RStudio (on a Windows machine), the semi-transparent rectangle behind "binomial" has a black border. Can that be removed?<br /><br />Again, thanks for doing this. I hope others will comment and support your efforts!<br />John K. Kruschkehttps://www.blogger.com/profile/17323153789716653784noreply@blogger.comtag:blogger.com,1999:blog-3240271627873788873.post-38921848202546282122012-10-14T19:35:50.353-04:002012-10-14T19:35:50.353-04:00I really like the DBDA style diagrams! In order to...I really like the DBDA style diagrams! In order to make it easier to draw such diagrams I made a short script that generates distribution plots that can be used as the "building blocks" of a hierarchical model diagram. Sample plots, the script and examples are available <a href="https://github.com/rasmusab/distribution_diagrams/blob/master/readme.md" rel="nofollow"> here</a>. Any feedback is very appreciated, for example, I was very unsure about the "canonical" shape of many of the distributions.<br /><br />/Rasmus BååthRasmus Bååthhttps://www.blogger.com/profile/16575386339856902265noreply@blogger.comtag:blogger.com,1999:blog-3240271627873788873.post-70257160081460434502012-07-03T13:48:15.746-04:002012-07-03T13:48:15.746-04:00Displaying the marginals of the posterior in a hie...Displaying the marginals of the posterior in a hierarchical diagram might be useful, but it is far less useful than displaying the prior and it could also be misleading. It's less useful because it no longer maps onto JAGS/BUGS code. It's potentially misleading because the diagrams with separate arrows from marginals suggest independence of those parameters in the joint distribution, but in general the parameters will not necessarily be independent in the posterior. Also, the posterior is often examined from many perspectives other than just the marginals on the single parameters. So, I think the cons outweigh the pros in this case...John K. Kruschkehttps://www.blogger.com/profile/17323153789716653784noreply@blogger.comtag:blogger.com,1999:blog-3240271627873788873.post-84333941629243497382012-06-28T18:06:46.657-04:002012-06-28T18:06:46.657-04:00I think that the difference in what I was thinking...I think that the difference in what I was thinking is that, rather than showing the prior to illustrate both M0 and T0, I was thinking about presenting the posterior of M0 and T0, even something like N(M0,T0), but replace the variable names by figures of the distributions for each answer. Would that make more sense?David Lhttps://www.blogger.com/profile/00493902406584308322noreply@blogger.comtag:blogger.com,1999:blog-3240271627873788873.post-85339056642070101652012-06-28T16:22:35.460-04:002012-06-28T16:22:35.460-04:00Thanks for your question.
The diagrams are inten...Thanks for your question. <br /><br />The diagrams are intended to communicate the <i>structure</i> of the <i>prior</i> and likelihood. For that purpose, iconic distributions are better than particular choices of hyperprior constants.<br /><br />For example, the iconic gamma, with its sharply descending curve on the left, communicates instantly that the distribution is limited on the left but has infinite extent to the right. If instead it showed a gamma(0.01,0.01) or whatever, it would be too easy to visually confuse with an exponential distribution.<br /><br />Similarly, the iconic beta distribution instantly communicates that the distribution is limited on both ends. If instead it showed an "uninformed" Haldane prior, approximated by beta(0.0001,0.0001), it would be a confusing squarish U-shaped distribution with spikes at the two ends, that might even be visually confused with a Bernoulli distribution.<br /><br />Thus, the iconic distributions do a good job for their intended purpose.<br /><br />It would not be appropriate to display the posterior this way because the marginals on the posterior are not necessarily shaped like any particular basic distribution. For example, a gamma prior on a parameter need not yield a gamma-shaped marginal posterior. Moreover, although the priors on the parameters are independent in the JAGS model, the posterior distribution usually has correlations among parameters.John K. Kruschkehttps://www.blogger.com/profile/17323153789716653784noreply@blogger.comtag:blogger.com,1999:blog-3240271627873788873.post-45774297134621663612012-06-28T13:41:24.698-04:002012-06-28T13:41:24.698-04:00I posted a related question on stats.SE about usin...I posted a related question on stats.SE about using this approach to visualize results:<br /><br />http://stats.stackexchange.com/q/31302/1381<br /><br />In brief: it is not clear to me from this example, but it appears that the curves are 'generic' representations of the distributions that neither represent the prior nor the posterior estimates - of course it would be useless to represent the distributions all as basically flat priors, but my question is this - would it be useful to print the posteriors? And if beta0 were indexed (e.g. for treatment 1...n,), the posteriors could be drawn over each other overlapped. I am about to create such a figure, feedback would be suggestedDavid Lhttps://www.blogger.com/profile/00493902406584308322noreply@blogger.comtag:blogger.com,1999:blog-3240271627873788873.post-56695104261542841752012-06-28T13:17:46.024-04:002012-06-28T13:17:46.024-04:00This comment has been removed by the author.David Lhttps://www.blogger.com/profile/00493902406584308322noreply@blogger.comtag:blogger.com,1999:blog-3240271627873788873.post-16476816239283382472012-05-15T08:57:06.047-04:002012-05-15T08:57:06.047-04:00Very interesting to try TikZ! And thanks for posti...Very interesting to try TikZ! And thanks for posting the question on stackexchange. Exciting as the TikZ approach is, does coding-up a big diagram in TikZ commands really save effort compared to assembling graphical components, WYSIWYG style, in a drawing application? I suppose it would be most exciting if a JAGS/BUGS model specification could be automatically parsed and converted to a diagram -- *that* would be cool. Thanks again.John K. Kruschkehttps://www.blogger.com/profile/17323153789716653784noreply@blogger.comtag:blogger.com,1999:blog-3240271627873788873.post-19881360324003145902012-05-15T00:03:01.005-04:002012-05-15T00:03:01.005-04:00I think the diagrams are great.
I asked a question...I think the diagrams are great.<br />I asked a question on Tex.SE about how production of such diagrams could be automated or produced with code.<br /><br />The answers might interest others:<br /><br />http://tex.stackexchange.com/q/55869/151<br /><br />In particular, there's an example of how the diagram could be produced using TikZ.Jeromy Anglimhttp://jeromyanglim.blogspot.comnoreply@blogger.comtag:blogger.com,1999:blog-3240271627873788873.post-31112402463629194452012-05-14T10:37:26.360-04:002012-05-14T10:37:26.360-04:00I find the diagrams in DBDA to be very clear. Thes...I find the diagrams in DBDA to be very clear. These were the first hierarchical model diagrams I had encountered and was a bit dismayed to find that this wasn't the convention.Iannoreply@blogger.comtag:blogger.com,1999:blog-3240271627873788873.post-55068252515835458792012-05-13T20:44:57.755-04:002012-05-13T20:44:57.755-04:00I make the diagrams "by hand" in OpenOff...I make the diagrams "by hand" in OpenOffice.John K. Kruschkehttps://www.blogger.com/profile/17323153789716653784noreply@blogger.comtag:blogger.com,1999:blog-3240271627873788873.post-20339201844393795712012-05-13T20:26:23.933-04:002012-05-13T20:26:23.933-04:00Have you made code or distribution templates avail...Have you made code or distribution templates available to create these types of models? If so, can you link to them in the post for easy access?dthhttps://www.blogger.com/profile/06316277986731208579noreply@blogger.com