mean2.mxPBF {SHT} | R Documentation |
Two-sample Mean Test with Maximum Pairwise Bayes Factor
Description
Not Written Here - No Reference Yet.
Usage
mean2.mxPBF(X, Y, a0 = 0, b0 = 0, gamma = 1, nthreads = 1)
Arguments
X |
an |
Y |
an |
a0 |
shape parameter for inverse-gamma prior (default: 0). |
b0 |
scale parameter for inverse-gamma prior (default: 0). |
gamma |
non-negative variance scaling parameter (default: 1). |
nthreads |
number of threads for parallel execution via OpenMP (default: 1). |
Value
a (list) object of S3
class htest
containing:
- statistic
maximum of pairwise Bayes factor.
- alternative
alternative hypothesis.
- method
name of the test.
- data.name
name(s) of provided sample data.
- log.BF.vec
vector of pairwise Bayes factors in natural log.
Examples
## Not run:
## empirical Type 1 error with BF threshold = 10
niter = 1000
counter = rep(0,niter) # record p-values
for (i in 1:niter){
X = matrix(rnorm(100*10), ncol=10)
Y = matrix(rnorm(200*10), ncol=10)
counter[i] = ifelse(mean2.mxPBF(X,Y)$statistic > 10, 1, 0)
}
## print the result
cat(paste("\n* Example for 'mean2.mxPBF'\n","*\n",
"* number of rejections : ", sum(counter),"\n",
"* total number of trials : ", niter,"\n",
"* empirical Type 1 error : ",round(sum(counter/niter),5),"\n",sep=""))
## End(Not run)
[Package SHT version 0.1.8 Index]