Howdy, Stranger!

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

Supported by

Scale Differences Across Models (new issue - I've seen Richard's Tweet)

Hello everyone,

My ultimate goal is to understand how the scale parameter impacts the prior probability allocated to various standardized effect sizes.

Here's my issue: my math (which is probably wrong) suggests a different relationship between the scales for ttestBF, anovaBF, and generalTestBF. Here's Richard's tweet:

"if X is the t-test prior scale, then X/sqrt(2) is the ANOVA scale, and X/2 is the corresponding regression scale."

However, here's the scales that I get:

1) t-test scale: (m1-m2)/sigma | g ~ Normal(0, g)
2) ANOVA scale: (m1-m2)/sigma | g ~ Normal(0, 2g)
3) generalTest scale: (m1-m2)/ sigma | g ~ Normal(0, 4g)

Here's my math (assume equal cell sizes throughout).

1) t-test follows directly from definition of t-test with prior defined on effect size.
2) ANOVA codes regression coefficient as sqrt(2)/2.

The difference in means is therefore: m1 - m2 = (alpha + betaANOVA * sqrt(2)/2) - (alpha - betaANOVA * sqrt(2)/2) = sqrt(2)*betaANOVA. So betaANOVA = (m1-m2)/sqrt(2). The ANOVA parametrization is:

betaANOVA | g ~ Normal(0, sigma^2 * g)

therefore, (m1-m2)/sigma | g ~ Normal(0, 2g) since betaANOVA*sqrt(2) / sigma | g ~ Normal(0, 2g)

3) Suppose I manually code as (+1, -1). Recall, the regression approach doubly normalizes the effect sizes.

m1 - m2 = (alpha + betaGT) - (alpha - betaGT) = 2*betaGT
so betaGT = (m1 - m2)/2

betaGT | g ~ Normal(0, sigma^2 * (XtX)^-1 * N * g)

With equal cell size,

betaGT | g ~ Normal(0, sigma^2 * g)

(m1-m2)/sigma | g ~ Normal(0, 4 g) since (2 betaGT)/sigma | g ~ Normal(0, 4 g)

Of course, the Bayes Factor package won't tie to my equations because it is programmed to take into account the relationship between the scales the way that Richard has defined them. It seems like with Richard's approach, there are terms that should be squared that are not (since Var(a*x) = a^2 Var(x)).

What am I doing wrong? Please help!


  • edited May 2018

    I considered that maybe the normal distributions were specified with the mean and standard deviation, but this doesn't seem to be the case in Rouder et al 2012 or in the documentation (e.g. see here:

    Is it something to do with the following: "The square-root of the scale for g's corresponding to fixed and random effects is given by rscaleFixed and rscaleRandom, respectively."

    I considered that maybe the rscale values need to be squared before plugging them into the formula. However, I interpret the above quote as talking about how the scale parameter enters into the Inverse Gamma distribution at which point it is squared (so that the formulas match Liang et al 2008; see equation 15).

  • I figured this out.

    x | g ~ Normal(0, x*g)
    g ~ InverseGamma(1/2, (r^2)/2)


    x ~ Cauchy(0, sqrt(x)*r)

    So, indeed, the square root of the multiple of g in the variance must be square rooted to convert to the proper scale for the Cauchy. Sorry for the message!

  • *The multiple of g must be square rooted to get the Cauchy scale parameter. My silly mistakes are now permenanlty stored on the internet. Great.
  • :-)
    It's not silly at all, of course. This stuff is very difficult. And even if it were silly (which it is definitely not), remember that it was the Leibnitz (!) who argued that the chance of throwing "11" with two dice is just as high as the chance of throwing "12".

  • Thanks for the encouragement, E.J. Love the anecdote on Leibnitz.

    Turns out I made another silly mistake in the fact that I used x twice to mean different things. Just to prevent confusion for anyone who reads this string at some point, I meant to say:

    Beta | g ~ Normal(0, x*g)
    g ~ InverseGamma(1/2, (r^2)/2)


    Beta ~ Cauchy(0, sqrt(x)*r)

Sign In or Register to comment.