Howdy, Stranger!

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

Supported by

Confidence intervals and one-wayd hypotheses for correlations

Hi!

I have two questions:

1) When I do Bayesian tests for correlations and get a confidence interval in JASP - is that a confidence interval for the effect size or for the correlation?

2) When changing my hypothesis to be one-way (in a certain direction), the confidence interval also changes. Would it, for this reason, be better to do a two-way test instead, so that I get a confidence interval that better represents what the confidence interval looks like in the population? Like, even if I expect the correlation to go in a certain direction, wouldn't the confidence interval for the non-directed hypothesis give me the best approximation of what the effect actually looks like "in the population"? Like, should the outcome really change based on if my expectation change? I mean, my expectation could be terrible...

Comments

  • If you're using R, you can get a posterior CI based on the null + two tailed + one tailed (all weighted based on the BF). You can read more about why you should do this here: https://doi.org/10.31234/osf.io/h6pr8


    Here is an example using BayesFactor and bayestestR:


    library(BayesFactor)

    library(bayestestR)


    corr_BF_two_tailed <- correlationBF(iris$Sepal.Width, iris$Sepal.Length)


    corr_BF_left_tailed <- correlationBF(iris$Sepal.Width, iris$Sepal.Length,

                       nullInterval = c(-1, 0))[1]


    corr_BF <- c(corr_BF_two_tailed, corr_BF_left_tailed)


    post_w <- weighted_posteriors(corr_BF)

    #> Independent-candidate M-H acceptance rate: 96%

    #> Independent-candidate M-H acceptance rate: 100%


    hist(post_w$rho)


    describe_posterior(post_w$rho)

    #> # Description of Posterior Distributions

    #> 

    #> Parameter | Median |          89% CI |    pd |        89% ROPE | % in ROPE

    #> --------------------------------------------------------------------------

    #> Posterior | -0.047 | [-0.202, 0.000] | 0.572 | [-0.100, 0.100] |  69.483

  • "1) When I do Bayesian tests for correlations and get a confidence interval in JASP - is that a confidence interval for the effect size or for the correlation?"

    For the correlation.

    "2) When changing my hypothesis to be one-way (in a certain direction), the confidence interval also changes. Would it, for this reason, be better to do a two-way test instead, so that I get a confidence interval that better represents what the confidence interval looks like in the population?"

    We generally recommend one-sided tests but two-sided credible intervals. See https://psyarxiv.com/yqxfr

    E.J.

  • "1) Great, thanks!

    "2) Yes that makes perfect sense, a little embarrassed I didn't think of that myself :)

Sign In or Register to comment.