Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

jobsatisfaction

Income and Job Satisfaction


Description

Income and job satisfaction by gender.

Usage

jobsatisfaction

Format

A contingency table with 104 observations on 3 variables.

Income

a factor with levels "<5000", "5000-15000", "15000-25000" and ">25000".

Job.Satisfaction

a factor with levels "Very Dissatisfied", "A Little Satisfied", "Moderately Satisfied" and "Very Satisfied".

Gender

a factor with levels "Female" and "Male".

Details

This data set was given in Agresti (2002, p. 288, Tab. 7.8). Winell and Lindbäck (2018) used the data to demonstrate a score-independent test for ordered categorical data.

Source

Agresti, A. (2002). Categorical Data Analysis, Second Edition. Hoboken, New Jersey: John Wiley & Sons.

References

Winell, H. and Lindbäck, J. (2018). A general score-independent test for order-restricted inference. Statistics in Medicine 37(21), 3078–3090. doi: 10.1002/sim.7690

Examples

## 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)

coin

Conditional Inference Procedures in a Permutation Test Framework

v1.4-1
GPL-2
Authors
Torsten Hothorn [aut, cre] (<https://orcid.org/0000-0001-8301-0471>), Henric Winell [aut] (<https://orcid.org/0000-0001-7995-3047>), Kurt Hornik [aut] (<https://orcid.org/0000-0003-4198-9911>), Mark A. van de Wiel [aut] (<https://orcid.org/0000-0003-4780-8472>), Achim Zeileis [aut] (<https://orcid.org/0000-0003-0918-3766>)
Initial release
2021-02-08

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.