# Adjusting prior scale factor in correlations using JZS prior

Hi there,

I am currently using the code outlined in the Wetzels & Wagenmakers (2012) paper to calculate BFs for correlation analyses. I am hoping to run the analyses using different prior scales (specifically increasing and decreasing by a factor of sqrt(2)) to compare the results. Would anybody be able to provide me some guidance as to which part of the code I would need to modify? I am new to Bayes and am struggling with the mathematics!

Any help would be really appreciated.

## Comments

Hi Julie,

There's nothing wrong with the WW2012 approach, but if you want to do this in JASP then you can selection "Bayesian correlation pairs" and explore different prior widths. The JASP version of the correlation test comes from Jeffreys (1961), who assigned a uniform prior on the correlation coefficient.

Cheers,

E.J.

Thanks E.J. Although I have used the JZS prior for my other analyses, so for the sake of consistency is there a way to easily adjust the prior for the W&W version? I really appreciated your help.

Julie

Hi Julie,

The code should specify some "r" scale value that you can change...yes, see here:

http://www.ejwagenmakers.com/2012/BFcorrelationsLargeN.R

Cheers,

E.J.

Sorry, I think I am still confused. I thought the r value in the code was representative of the correlation coefficient, not the scale factor...am I wrong? After re-reading the paper, I get the impression I should be adjusting g given that informs the prior....

Apologies if I have it wrong. Would you mind clarifying?

Thank you so much for your help-much appreciated!

My bad! Yes, you are right, g informs the prior (see also http://www.ejwagenmakers.com/2012/WetzelsEtAl2012AmStat.pdf)

Cheers,

E.J.

Thank you E.J. Much appreciated!