set.seed(29)
x <- sort(runif(20))
y <- rbinom(20, 1, 0.5)
mydata <- data.frame(c(x,y))
mod <- maxstat.test(y ~ x, data=mydata, smethod="Median",
pmethod="HL", alpha=0.05)
print(mod)
plot(mod)
Run the code above in your browser using DataLab