tag:blogger.com,1999:blog-3240271627873788873.post4384744230963298132..comments2024-03-26T06:46:11.752-04:00Comments on Doing Bayesian Data Analysis: New R Package for BEST (Bayesian ESTimation supersedes the t test)John K. Kruschkehttp://www.blogger.com/profile/17323153789716653784noreply@blogger.comBlogger18125tag:blogger.com,1999:blog-3240271627873788873.post-21295493888636827442019-08-20T05:26:38.115-04:002019-08-20T05:26:38.115-04:00i like this post but am working on bayesian cubic ...i like this post but am working on bayesian cubic polynomial regression and i need help on how to run it on R-software...bisiriyufemihttps://www.blogger.com/profile/02384452430773110161noreply@blogger.comtag:blogger.com,1999:blog-3240271627873788873.post-2168841523979742382016-09-16T06:49:48.122-04:002016-09-16T06:49:48.122-04:00I'm just following up with a new question - i&...I'm just following up with a new question - i'm new to Bayesian Analysis, so apologies if i've missed something obvious, but is there a methodology for testing the difference of non-symmetric distributions?<br /><br />For example, how would I go about comparing the skewness of two distributions to see if they are different?<br /><br />Thanks,<br /><br />RichAnonymoushttps://www.blogger.com/profile/12966230511447232528noreply@blogger.comtag:blogger.com,1999:blog-3240271627873788873.post-65560855236642594852016-08-22T09:23:37.887-04:002016-08-22T09:23:37.887-04:00Ahhh! Thanks John - I didn't realise that woul...Ahhh! Thanks John - I didn't realise that would happen in jags, and it makes sense that the default for BEST would match that.<br /><br />I'll have a look at the runjags manual to see if there is a simple workaround.<br /><br />Thanks again!<br /><br />Rich<br /><br />Anonymoushttps://www.blogger.com/profile/12966230511447232528noreply@blogger.comtag:blogger.com,1999:blog-3240271627873788873.post-60558830694477654972016-08-05T15:17:39.739-04:002016-08-05T15:17:39.739-04:00Please ask Mike Meredith directly about the innard...Please ask Mike Meredith directly about the innards of the BEST package. In the DBDA2E software (not the BEST package), the number of cores used is set when DBDA2E-utilities.R is sourced. The relevant code is as follows:<br /><br />library(parallel) # for detectCores().<br />nCores = detectCores() <br />if ( !is.finite(nCores) ) { nCores = 1 } <br />if ( nCores > 4 ) { <br /> nChainsDefault = 4 # because JAGS has only 4 rng's.<br /> runjagsMethodDefault = "parallel"<br />}<br />if ( nCores == 4 ) { <br /> nChainsDefault = 3 # save 1 core for other processes.<br /> runjagsMethodDefault = "parallel"<br />}<br />if ( nCores < 4 ) { <br /> nChainsDefault = 3 <br /> runjagsMethodDefault = "rjags" # NOT parallel<br />}<br /><br />Notice that it maxes out at 4 because JAGS would recycle its PRNGs and produce identical chains. You can manually manipulate the initial values and PRNGs -- see the runjags manual at <a href="https://cran.r-project.org/web/packages/runjags/index.html" rel="nofollow">https://cran.r-project.org/web/packages/runjags/index.html</a>John K. Kruschkehttps://www.blogger.com/profile/17323153789716653784noreply@blogger.comtag:blogger.com,1999:blog-3240271627873788873.post-87603131918943083922016-08-05T06:17:56.011-04:002016-08-05T06:17:56.011-04:00Mike,
I've recently started using BEST and ha...Mike,<br /><br />I've recently started using BEST and have found it easy to set up and play with. <br /><br />However, I have a question about the 'parallel' option. I would like to run BEST with more than the 3 cores BESTmcmc appears to be defaulted too. Is there a way to run BEST on the nCores-1? Or to choose the number of cores that I can run BEST on?<br /><br />Many thanks,<br /><br />RichAnonymoushttps://www.blogger.com/profile/12966230511447232528noreply@blogger.comtag:blogger.com,1999:blog-3240271627873788873.post-23210084991527225342014-02-25T09:38:17.778-05:002014-02-25T09:38:17.778-05:00What follows is a reply to Deleep from Mike Meredi...What follows is a reply to Deleep <b>from Mike Meredith</b>:<br /><br />Dear Duleep,<br /><br />I can't point you to papers describing a Bayesian analysis of ANOVA-type models, but I will indicate sources with advice and pass this on to John Kruscke who may have more references to hand.<br /><br />John has a blog post on the topic at http://doingbayesiandataanalysis.blogspot.com/2012/05/how-to-report-bayesian-analysis.html. This has a reproduction of the first part of section (23.1) on "Reporting a Bayesian analysis" from Kruschke, J.K. (2011) Doing Bayesian data analysis: a tutorial with R and BUGS Elsevier, Amsterdam etc.<br /><br />The main points are summarised in Kruschke, J.K., Aguinis, H., & Joo, H. (2012) The time has come: Bayesian methods for data analysis in the organizational sciences. Organizational Research Methods, 15, 722-752 in the section "Recommendations and Illustration of How to Report Bayesian Analysis Results", where they also give an example of writing up a regression analysis.<br /><br />Also Kruschke, J.K. (2013) Bayesian estimation supersedes the t test. *Journal of Experimental Psychology: General*, 142, 573-603 has a section on "Reporting the results of a Bayesian analysis". You would need to cite that paper as the description of the methods for robust Bayesian analysis.<br /><br />There are links to the two Kruschke papers at http://www.indiana.edu/~kruschke/publications.html<br /><br />In my own field (wildlife ecology) we can rarely do experiments, so hypothesis testing is scarcely relevant anyway. The focus is on estimation (of density, abundance, occupancy, survival, etc) or on modelling. In the latter context, information theoretic approaches (using Akaike's Information Criterion, AIC) have been the norm, and moving from there to a Bayesian approach is relatively painless. So I can't point you to papers reporting a Bayesian analysis of ANOVA-type data; Marc Kery's book, An Introduction to WinBUGS for Ecologists (Academic Press, 2010), shows how to do this, but not how to write it up.<br /><br />Regards, Mike.<br />John K. Kruschkehttps://www.blogger.com/profile/17323153789716653784noreply@blogger.comtag:blogger.com,1999:blog-3240271627873788873.post-10170513035476435852014-02-24T01:34:57.223-05:002014-02-24T01:34:57.223-05:00Sir, I can make the plots, sorry but how to analys...Sir, I can make the plots, sorry but how to analyse the plots and write a paper. Will you please put up a model paper with such analyses. In India we have been brought up on a strict diet of ANOVA-RBD/CRD, and t tests with CV values (Analysis of Variance - Randomized Block Design / Completely Randomized design). How can I do these analyses / similar in Bayesian methods, with regards, Dr.D.K.Samuel, Ind Inst of Hort Research, Bangalore - 89Duleep Samuelhttps://www.blogger.com/profile/00157369685945372551noreply@blogger.comtag:blogger.com,1999:blog-3240271627873788873.post-29421927866008202792013-11-19T15:54:55.898-05:002013-11-19T15:54:55.898-05:00Yes, BEST can be used for paired data. The origina...Yes, BEST can be used for paired data. The original programs and the re-packaged programs by Mike Meredith do it. See http://doingbayesiandataanalysis.blogspot.com/2012/09/one-group-version-of-best-bayesian.html<br />Thanks for your interest.John K. Kruschkehttps://www.blogger.com/profile/17323153789716653784noreply@blogger.comtag:blogger.com,1999:blog-3240271627873788873.post-46285771251341056132013-11-19T15:28:59.420-05:002013-11-19T15:28:59.420-05:00Hi,
First thanks for making all this available a...Hi, <br /><br />First thanks for making all this available as packages and the theory. It is much a appreciated! <br /><br />My question is if the BEST can be used where one would used a paired t-test? e.g. repeated measures.<br /><br />Sorry if this is in the book, I have just started reading it.<br /><br />Madshttps://www.blogger.com/profile/12776318016569982844noreply@blogger.comtag:blogger.com,1999:blog-3240271627873788873.post-947156230366389932013-08-20T20:23:43.914-04:002013-08-20T20:23:43.914-04:00For what it's worth, it seems the problem was ...For what it's worth, it seems the problem was that I hadn't updated R on my machine in way too long. After installing the current version of R, I had no problems getting the package.Jonathan Livengoodhttps://www.blogger.com/profile/08264815112941067048noreply@blogger.comtag:blogger.com,1999:blog-3240271627873788873.post-62722938521142168122013-08-20T17:01:45.812-04:002013-08-20T17:01:45.812-04:00It works for me... Perhaps try a different CRAN mi...It works for me... Perhaps try a different CRAN mirror site. Thanks.John K. Kruschkehttps://www.blogger.com/profile/17323153789716653784noreply@blogger.comtag:blogger.com,1999:blog-3240271627873788873.post-78651269681242805162013-08-18T14:03:25.165-04:002013-08-18T14:03:25.165-04:00Has the BEST package been discontinued or somethin...Has the BEST package been discontinued or something? I tried to download it today and could not locate it:<br /><br />> install.packages("BEST")<br />Installing package(s) into ‘C:\Users\aletheist\Documents/R/win-library/2.12’<br />(as ‘lib’ is unspecified)<br />Warning message:<br />In getDependencies(pkgs, dependencies, available, lib) :<br /> package ‘BEST’ is not available<br /><br />Jonathan Livengoodhttps://www.blogger.com/profile/08264815112941067048noreply@blogger.comtag:blogger.com,1999:blog-3240271627873788873.post-88934559197482579052013-06-17T12:39:56.446-04:002013-06-17T12:39:56.446-04:00Dear Anonymous June 17:
From the error message yo...Dear Anonymous June 17:<br /><br />From the error message you included, it looks like what is actually failing is rjags, not BEST. Have you installed rjags? Please follow all the steps at http://doingbayesiandataanalysis.blogspot.com/search/label/installation<br />Hope that solves it for you.John K. Kruschkehttps://www.blogger.com/profile/17323153789716653784noreply@blogger.comtag:blogger.com,1999:blog-3240271627873788873.post-74152741264757326912013-06-17T10:34:27.180-04:002013-06-17T10:34:27.180-04:00I tried to download and install BEST (for MacOS 10...I tried to download and install BEST (for MacOS 10.6.8), but it failed:<br /><br />> install.packages("BEST")<br />trying URL 'http://cran.uk.r-project.org/bin/macosx/contrib/3.0/BEST_0.1.0.tgz'<br />Content type 'application/x-gzip' length 587233 bytes (573 Kb)<br />opened URL<br />==================================================<br />downloaded 573 Kb<br /><br /><br />The downloaded binary packages are in<br /> /var/folders/r6/r6IOB+RkFwqO0yZdeBE1c++++TI/-Tmp-//RtmpLoCxqL/downloaded_packages<br />> library(BEST)<br />Loading required package: rjags<br />Error : .onLoad failed in loadNamespace() for 'rjags', details:<br /> call: dyn.load(file, DLLpath = DLLpath, ...)<br /> error: unable to load shared object '/Library/Frameworks/R.framework/Versions/3.0/Resources/library/rjags/libs/rjags.so':<br /> dlopen(/Library/Frameworks/R.framework/Versions/3.0/Resources/library/rjags/libs/rjags.so, 10): Library not loaded: /usr/local/lib/libjags.3.dylib<br /> Referenced from: /Library/Frameworks/R.framework/Versions/3.0/Resources/library/rjags/libs/rjags.so<br /> Reason: image not found<br />Error: package ‘rjags’ could not be loaded<br />trying URL 'http://cran.uk.r-project.org/bin/macosx/contrib/3.0/foreign_0.8-54.tgz'<br />Content type 'application/x-gzip' length 254326 bytes (248 Kb)<br />opened URL<br />==================================================<br />downloaded 248 Kb<br /><br />trying URL 'http://cran.uk.r-project.org/bin/macosx/contrib/3.0/mgcv_1.7-24.tgz'<br />Content type 'application/x-gzip' length 1448309 bytes (1.4 Mb)<br />opened URL<br />==================================================<br />downloaded 1.4 Mb<br /><br /><br />The downloaded binary packages are in<br /> /var/folders/r6/r6IOB+RkFwqO0yZdeBE1c++++TI/-Tmp-//RtmpLoCxqL/downloaded_packages<br /><br />any suggestions for how I can get it to run would be gratefully received.<br />ThanksAnonymousnoreply@blogger.comtag:blogger.com,1999:blog-3240271627873788873.post-70446825858277613582013-06-10T15:55:44.197-04:002013-06-10T15:55:44.197-04:00Dear Anonymous June 10:
BLOG looks interesting, b...Dear Anonymous June 10:<br /><br />BLOG looks interesting, but it is still in version < 1.0. On the other hand, JAGS is stable and I recommend it. (The likely successor to JAGS might be STAN, but I'd say stick to JAGS for learning and for moderately sized data applications. STAN may be the way to go if you have large data.)<br /><br />And thanks for getting the book. I hope it serves you well.John K. Kruschkehttps://www.blogger.com/profile/17323153789716653784noreply@blogger.comtag:blogger.com,1999:blog-3240271627873788873.post-28874662593086737522013-06-10T15:18:19.172-04:002013-06-10T15:18:19.172-04:00I've bought your book and have begun the proce...I've bought your book and have begun the process of converting myself over to Bayesian. I was wondering if you had any opinions on BLOG (https://sites.google.com/site/bloginference/). <br /><br />Or should I just learn JAGS instead?Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-3240271627873788873.post-43546824363040387342013-06-05T09:32:13.359-04:002013-06-05T09:32:13.359-04:00Dear Anonymous: Thanks for the comment. When I ori...Dear Anonymous: Thanks for the comment. When I originally created the post, the binaries were not yet on CRAN. But now they are, and I have updated the blog post.John K. Kruschkehttps://www.blogger.com/profile/17323153789716653784noreply@blogger.comtag:blogger.com,1999:blog-3240271627873788873.post-74386480586823040172013-06-05T06:12:05.360-04:002013-06-05T06:12:05.360-04:00Re installing the package: what's wrong with s...Re installing the package: what's wrong with simply typing <br /><br />install.packages("BEST")<br /><br />? As long as you have a working internet connection, this should work on Windows, Linux, Apple OS etc. Anonymousnoreply@blogger.com