Howdy, Stranger!

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

Supported by

Change in Bayesian Factor estimates when I reorder variables & covariates in BFpack

Hi everyone,

I am calculating Bayesian partial correlations in JASP using BFpack and have noticed that the estimated Bayes factor changes when I change the order in which variables or covariates are entered.

For example, I am investigating the association between a personality score and amygdala volume, controlling for total intracranial volume (TIV), age, and gender. Gender is a binary variable coded 1/2.

When I enter TIV first among the covariates, I obtain a Bayes factor of approximately 42.63 in favour of the two-sided alternative over the null hypothesis. When I enter gender first, the corresponding Bayes factor is approximately 14.15. The variables and covariates themselves remain unchanged, and I use a fixed random seed.

I also observe different Bayesian estimates when using different variable and covariate orders directly in R with BFpack. My R script uses the same complete cases throughout, resets the seed before each run, and includes all covariates jointly through the formula argument.

My understanding is that the covariates are included simultaneously, so their order should not change the underlying model. Although Monte Carlo estimates can vary, I am unsure whether this explains the magnitude of the differences.

Has anyone encountered this issue and found a solution, or could someone explain why this happens?

Thank you for your help!

Comments

  • Further information that might be helpful:

    The analysis includes 197 participants. I estimate the partial correlation between a personality score and grey matter volume, controlling simultaneously for TIV, age, and gender (coded 1/2).

    My JASP settings are:

    • Sampling method: LKJ
    • MCMC iterations: 100,000
    • Fixed random seed: 12345
    • Credible interval: 95%, central
    • Manual hypothesis comparison: H1 specifies that the partial correlation equals zero; H2 is its complement (a two-sided alternative). Both hypotheses have equal prior weights.


  • Hi,

    that is indeed an odd result. I have asked the R package maintainer about this. And he will hopefully get back to me shortly.


    Julius

  • Thank you!

Sign In or Register to comment.