Closed pietromarchesi closed 3 years ago
Is there a way to extract the Bayes factor as a float from the ttestBF output? I am trying this:
ttestBF
> a = c(0.5, 0.6, 0.4, 0.5, 0.67, 0.5) > b = c(0.7, 0.8, 0.7, 0.91, 0.93, 0.87) > > ttestBF(x=a, y=b, paired=TRUE) Bayes factor analysis -------------- [1] Alt., r=0.707 : 73.99527 ±0% Against denominator: Null, mu = 0 --- Bayes factor type: BFoneSample, JZS > > out = ttestBF(x=a, y=b, paired=TRUE) > out@bayesFactor[['bf']] [1] 4.304001
But I am unable to dig the 73.99527 out, I only get this 4.304001, which I also see popping up in the numerator slot.
73.99527
4.304001
EDIT: solved with extractBF(out)['bf']
extractBF(out)['bf']
Is there a way to extract the Bayes factor as a float from the
ttestBF
output? I am trying this:But I am unable to dig the
73.99527
out, I only get this4.304001
, which I also see popping up in the numerator slot.EDIT: solved with
extractBF(out)['bf']