# NOT RUN {
## Approximative (Monte Carlo) linear-by-linear association test
lbl_test(jobsatisfaction, distribution = approximate(nresample = 10000))
# }
# NOT RUN {
## Approximative (Monte Carlo) score-independent test
## Winell and Lindbaeck (2018)
(it <- independence_test(jobsatisfaction,
distribution = approximate(nresample = 10000),
xtrafo = function(data)
trafo(data, factor_trafo = function(x)
zheng_trafo(as.ordered(x))),
ytrafo = function(data)
trafo(data, factor_trafo = function(y)
zheng_trafo(as.ordered(y)))))
## Extract the "best" set of scores
ss <- statistic(it, type = "standardized")
idx <- which(abs(ss) == max(abs(ss)), arr.ind = TRUE)
ss[idx[1], idx[2], drop = FALSE]
# }
Run the code above in your browser using DataLab