| jobsatisfaction | R Documentation |
Income and job satisfaction by gender.
jobsatisfaction
A contingency table with 104 observations on 3 variables.
Incomea factor with levels "<5000", "5000-15000",
"15000-25000" and ">25000".
Job.Satisfactiona factor with levels "Very Dissatisfied",
"A Little Satisfied", "Moderately Satisfied" and
"Very Satisfied".
Gendera factor with levels "Female" and "Male".
This data set was given in \bibcitet|coin::agresti2002|Tab. 7.8 on p. 288. \bibcitetcoin::winell_2018 used the data to demonstrate a score-independent test for ordered categorical data.
*
## 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]
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.