Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Supported by

Comparison of Bayes Factor for correlations calculated in JASP vs. in R using the BayesMed package

edited January 2016 in JASP & BayesFactor

Dear all,

I recently tried out JASP to run some Bayesian analyses. So far, I have been using R for this, and I was interested in whether I would get the same results, especially since JASP is using R internally for its analyses.

Computing the Bayes Factors for t-tests in JASP lead to the same results as the ttestBF function from the BayesFactor R package (I think JASP uses this function internally). However, the results were different for correlations. Specifically, I calculated the correlation between Agreeableness and Openness in the Big5 example dataset provided by JASP.

Using JASP Bayesian Correlation Pairs to calculate the Bayes Factor for the correlation (with default settings, i.e. Hypothesis: correlated, Beta*prior width = 1), leads to a BF10 = 32.64.

Calculating the Bayes Factor in R with the following script:

library(BayesMed)
dataset <- read.csv("Big 5 (Dolan, Oort, Stoel & Wicherts, 2009).csv",sep=" ")
with(dataset,jzs_cor(Agreeableness,Openness,alternative="two.sided"))

leads to a Bayes Factor of 21.01.

I would be very interested in understanding where the different results come from. It would be great if someone could point me to an explanation. Thanks a lot in advance!

Best regards,

Pascal

Comments

  • EJEJ
    edited 12:01PM

    Hi Pascal,

    JASP uses the correlation test as originally proposed by Jeffreys in 1961. It assumes a bivariate normal distribution and puts (by default) a uniform prior on rho. The philosophy behind the test is explained here (http://www.ejwagenmakers.com/inpress/JeffreysToPTests.pdf) and the mathematics are here (http://arxiv.org/abs/1510.01188). This is all work by my awesome student Alexander Ly. An application is here (http://www.ejwagenmakers.com/submitted/BayesianBathingHabits.pdf).

    I think BayesFactor uses a JZS test (my former student Ruud Wetzels proposed it in PBR: http://www.ejwagenmakers.com/2012/WetzelsWagenmakers2012.pdf). Right, Richard?

    Which test you use is a matter of taste and conviction. I am reluctant to argue strongly for one or the other. The Jeffreys test is conceptually simple and straightforward to explain, but the JZS test is consistent with the other tests in the packages. I would see this as an opportunity for a robustness analysis -- most likely the results will point in the same direction.

    In a perfect world, JASP would also offer the JZS option, and the BayesFactor package would also offers the Jeffreys option. I think we might want to work towards that goal.

    Cheers,
    E.J.

  • edited 12:01PM

    Hi EJ,

    thanks a lot for your helpful answer! I will have a look at the papers you pointed me to.

    In the project I am currently working on, I am also reporting reporting JZS Bayes factors for t-tests. So I will probably report the Bayes factors from the BayesMed package for the correlations - for reasons of consistency.

    I also think that it would be interesting to see how both types of Bayes factors relate to each other. I have not had the time so far to do a thorough simulation for that. Instead, I just calculated the Bayes factors for all pairwise correlations in the JASP Big 5 example dataset (see Table and Figure below). As you suggested, the Bayes factors point in the same direction.

    Best,

    Pascal

    image

    var1 var2 BayesMed JASP
    Neuroticism Openness 0.04 0.06
    Openness Conscientiousness 0.04 0.06
    Extraversion Agreeableness 0.07 0.12
    Extraversion Conscientiousness 0.10 0.16
    Neuroticism Agreeableness 3.29 5.12
    Agreeableness Conscientiousness 20.12 31.25
    Openness Agreeableness 21.01 32.64
    Extraversion Openness 3.5E+06 5.3E+06
    Neuroticism Extraversion 4.6E+12 1.1E+14
    Neuroticism Conscientiousness 1.8E+14 8.4E+15
  • edited 12:01PM

    EJ,

    Didn't Pascal use BayesMed and not BayesFactor to do the JZS correlations? In which case shouldn't you be considering adding the Jeffereys option to your own R package as it only does JZS and JZS Savage-Dickey based correlations? :)

    BayesFactor only does Regression models not as far as I can see correlations directly although I am happy to be corrected on this. Similarly BayesFactor I think

    Thanks.

    Bryan.

  • EJEJ
    edited 12:01PM

    Hi Bryan,

    Ah, BayesMed...I will leave that one up to Michele! :-)

    Cheers,
    E.J.

Sign In or Register to comment.

agen judi bola , sportbook, casino, togel, number game, singapore, tangkas, basket, slot, poker, dominoqq, agen bola. Semua permainan bisa dimainkan hanya dengan 1 ID. minimal deposit 50.000 ,- bonus cashback hingga 10% , diskon togel hingga 66% bisa bermain di android dan IOS kapanpun dan dimana pun. poker , bandarq , aduq, domino qq , dominobet. Semua permainan bisa dimainkan hanya dengan 1 ID. minimal deposit 10.000 ,- bonus turnover 0.5% dan bonus referral 20%. Bonus - bonus yang dihadirkan bisa terbilang cukup tinggi dan memuaskan, anda hanya perlu memasang pada situs yang memberikan bursa pasaran terbaik yaitu http://45.77.173.118/ Bola168. Situs penyedia segala jenis permainan poker online kini semakin banyak ditemukan di Internet, salah satunya TahunQQ merupakan situs Agen Judi Domino66 Dan BandarQ Terpercaya yang mampu memberikan banyak provit bagi bettornya. Permainan Yang Di Sediakan Dewi365 Juga sangat banyak Dan menarik dan Peluang untuk memenangkan Taruhan Judi online ini juga sangat mudah . Mainkan Segera Taruhan Sportbook anda bersama Agen Judi Bola Bersama Dewi365 Kemenangan Anda Berapa pun akan Terbayarkan. Tersedia 9 macam permainan seru yang bisa kamu mainkan hanya di dalam 1 ID saja. Permainan seru yang tersedia seperti Poker, Domino QQ Dan juga BandarQ Online. Semuanya tersedia lengkap hanya di ABGQQ. Situs ABGQQ sangat mudah dimenangkan, kamu juga akan mendapatkan mega bonus dan setiap pemain berhak mendapatkan cashback mingguan. ABGQQ juga telah diakui sebagai Bandar Domino Online yang menjamin sistem FAIR PLAY disetiap permainan yang bisa dimainkan dengan deposit minimal hanya Rp.25.000. DEWI365 adalah Bandar Judi Bola Terpercaya & resmi dan terpercaya di indonesia. Situs judi bola ini menyediakan fasilitas bagi anda untuk dapat bermain memainkan permainan judi bola. Didalam situs ini memiliki berbagai permainan taruhan bola terlengkap seperti Sbobet, yang membuat DEWI365 menjadi situs judi bola terbaik dan terpercaya di Indonesia. Tentunya sebagai situs yang bertugas sebagai Bandar Poker Online pastinya akan berusaha untuk menjaga semua informasi dan keamanan yang terdapat di POKERQQ13. Kotakqq adalah situs Judi Poker Online Terpercayayang menyediakan 9 jenis permainan sakong online, dominoqq, domino99, bandarq, bandar ceme, aduq, poker online, bandar poker, balak66, perang baccarat, dan capsa susun. Dengan minimal deposit withdraw 15.000 Anda sudah bisa memainkan semua permaina pkv games di situs kami. Jackpot besar,Win rate tinggi, Fair play, PKV Games