# NOT RUN {
##generate data
set.seed(100)
n = 1000
cov_num = 5
level_num = c(2,2,2,2,2)
pr = rep(0.5,10)
beta = c(0.1,0.4,0.3,0.2,0.5)
mu1 = 0
mu2 = 0.01
sigma = 1
type = "linear"
p = 0.85
dataS = getData(n, cov_num, level_num, pr, type,
beta, mu1, mu2, sigma, StrBCD, p)
#run the randomization test
library("ggplot2")
Strt = rand.test(data = dataS, Reps = 200,method = StrBCD,
conf = 0.95, plot = TRUE, binwidth = 30,
p = 0.85)
Strt
# }
Run the code above in your browser using DataLab