本文介绍了BayesFactor程序包R:两种不同的输出的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用BayesFactor程序包,但使用两个非常相似的代码,对于相同数据,我会得到两个不同的输出.我想知道哪一个是正确的?

I'm using the BayesFactor package but I get two different output for the same data using two very similar codes. I'm wondering which one is correct?

if(!require(BayesFactor)){install.packages('BayesFactor')}

require(BayesFactor)
##################################################

exp(ttest.tstat(t= 2 , n1=40, n2=40, nullInterval =c(0, Inf), rscale = sqrt(2)/2,
        complement = FALSE, simple = FALSE)$bf)   ### !CHECK THIS OUTPUT! ###


exp(ttest.tstat(t= 2 , n1=40, n2=40, nullInterval =c(0, Inf), rscale = sqrt(2)/2,
       complement = FALSE, simple = TRUE))    ### !CHECK THIS OUTPUT! ###

推荐答案

?ttest.tstat

本质上,当simple=TRUE

ttest.tstat(t= 2 , n1=40, n2=40, nullInterval =c(0, Inf),
   rscale = sqrt(2)/2, complement = FALSE, simple = TRUE)
#     B10
# 2.502954

simple=FALSE

exp(ttest.tstat(t= 2 , n1=40, n2=40, nullInterval =c(0, Inf),
        rscale = sqrt(2)/2, complement = FALSE, simple = FALSE)$bf)
#[1] 2.502954

这篇关于BayesFactor程序包R:两种不同的输出的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-15 03:52