Howdy, Stranger!

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

Supported by

Help with the JASP Likelihood Function (MATLAB)

Hi all, I am trying to implement the JZS/objective approach to calculating Bayes Factors (the approach used in JASP and the R BayesFactor package) in Matlab, with a view toward creating a power analysis toolkit. Although I am close, the BFs I calculate are slightly off compared to JASP and the PCL web tool.

I understand the objective prior, and my implementation looks identical to that in JASP. But I'm not clear on the Likelihood function, and the likelihood I calculate appears different from what appears in JASP. I have tried a few but here was my closest:

sample.likelihood =
@(delta) tpdf( (sample.mean - (delta * * sqrt(sample.n)) ) /, sample.n-1);

JASP doesn't provide any likelihood info, and the R code may as well be hieroglyphics for as clear as it is to me. So I can really only judge by comparing the graphs in JASP to the ones I produce (example below). It appears that my prior matches but the posterior is slightly taller and narrower, presumably because of the likelihood calculation.

So, is my likelihood calculation off? Thanks if anyone can help.

By the way, probably aggravating this confusion is that I'm not clear what the x axis represents in this analysis (labelled as "Effect Size delta"). Am I correct in thinking this is Cohen's d? But we use t distributions so I get confused whether it is related to the_ t _stat or the delta parameter from a noncentral t distribution.


  • Hi MattO,

    You might want to check out this paper:
    Effect size delta is defined as mu/sigma.

    As an aside, I was a MATLAB user myself, a bunch of my friends use MATLAB, but I have to say that the closed-source aspect of it has started to rub me the wrong way in recent years. Isn't Octave an open-source version? A was recently sent a .mat file and it was basically useless to me.


  • edited July 2018

    Thanks EJ, it looks like Equation 8 is the likelihood function I have been looking for. (Is Equation 9 the marginal likelihood?) I had not realized that I needed sigma in the likelihood function too.

    I have implemented it and get still different BFs values than before, but still close. I'm not sure if perhaps it has something to do with the integral function in MATLAB. I also don't know if it's specific calculation problem with the marginal likelihood of the alternative, or of the null. If there are any other sources that provide the marginals you could recommend, it would help me to isolate the issue.


  • You can also implement this in WinBUGS and use Savage-Dickey (the Wetzels et al. 2011 PBR approach), or use Stan and the bridgesampling package.

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 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