### independence of asat and group via normal scores test
independence_test(asat ~ group, data = asat,
### exact null distribution
distribution = "exact",
### one-sided test
alternative = "greater",
### apply normal scores to asat$asat
ytrafo = function(data) trafo(data, numeric_trafo = normal_trafo),
### indicator matrix of 1st level of group
xtrafo = function(data) trafo(data, factor_trafo = function(x)
matrix(x == levels(x)[1], ncol = 1))
)
### same as
normal_test(asat ~ group, data = asat, distribution = "exact",
alternative = "greater")
### if you are interested in the internals:
browseURL(system.file("documentation", "html", "index.html",
package = "coin"))
Run the code above in your browser using DataLab