Effect of smoking at 45 years of age on self reported health five years later. Data are on a sample of males from the Glostrup survey.
A table with daily smoking categories for the rows and self reported health five years later as the columns.
Data example found on the internet but originates from Svend Kreiner
data(smokehealth) m <- smokehealth m[,3] <- m[,3]+ m[,4] m[4,] <- m[4,] + m[5,] m <- m[1:4,1:3] gkgamma(m)#> #> Goodman-Kruskal's gamma for ordinal categorical data #> #> data: m #> Z = 3.2383, p-value = 0.001202 #> 95 percent confidence interval: #> 0.1056581 0.4054653 #> sample estimates: #> Goodman-Kruskal's gamma #> 0.2555617 #>chisq.test(m)#> #> Pearson's Chi-squared test #> #> data: m #> X-squared = 12.871, df = 6, p-value = 0.04512 #>