set.seed(123)
x <- list()
x[[1]] <- rnorm(10, 0, 1)
x[[2]] <- rnorm(10, 0.8, 1)
x[[3]] <- rnorm(10, 0.5, 1)
x[[4]] <- rnorm(10, 1.3, 1)
vec <- c(-1, 1, -1, 1) / 2
RandomizedBlocksAnalysis(x, con = vec, alpha = 0.05)
# $n
# [1] 10 10 10 10
# $test
# test crit se df
# [1,] 4.432644 2.038622 0.2798104 31.33793
# $psihat
# psihat ci.lower ci.upper p.value
# [1,] 1.2403 0.6698721 1.810728 0.0001062952
# $sig
# [1] TRUE
RandomizedBlocksAnalysis(x,con=vec,alpha=0.05,alternative='greater')
# n
# [1] 10 10 10 10
# $test
# test crit se df
# [1,] 4.432644 1.694956 0.2798104 31.33793
# $psihat
# psihat ci.lower ci.upper p.value
#[1,] 1.2403 0.7660336 Inf 5.314762e-05
# $sig
# [1] TRUE
RandomizedBlocksAnalysis(x,con=-vec,alpha=0.05,alternative='greater')
#$n
#[1] 10 10 10 10
#$test
# test crit se df
#[1,] -4.432644 1.694956 0.2798104 31.33793
#$psihat
# psihat ci.lower ci.upper p.value
#[1,] -1.2403 -1.714566 Inf 0.9999469
#$sig
#[1] FALSE
x[[5]]=rnorm(10,-0.2,1)
x[[6]]=rnorm(10,0.6,1)
vec=c(1,-1,1,-1,1,-1)/3
RandomizedBlocksAnalysis(x,con=vec,alpha=0.05,alternative='less')
#$n
#[1] 10 10 10 10 10 10
#$test
# test crit se df
#[1,] -4.946987 1.677021 0.236575 48.29776
#$psihat
# psihat ci.lower ci.upper p.value
#[1,] -1.170334 -Inf -0.7735925 4.76961e-06
#$sig
#[1] TRUE
Run the code above in your browser using DataLab