Description Usage Arguments Value Author(s) References See Also Examples

Compute Goodman-Kruskal's gamma statistic for a two-dimensional table of ordered categories

1 | ```
gkgamma(x, conf.level = 0.95)
``` |

`x` |
A matrix or table representing the two-dimensional ordered contingency table of observations |

`conf.level` |
Level of confidence interval |

A list with class `htest`

containing the following components:

`statistic ` |
the value the test statistic for testing no association |

`p.value ` |
the p-value for the test |

`estimate ` |
the value the gamma estimate |

`conf.int ` |
the confidence interval for the gamma estimate |

`method ` |
a character string indicating the type of test performed |

`data.name ` |
a character string indicating the name of the data input |

`observed ` |
the observed counts |

`s0 ` |
the SE used when computing the test statistics |

`s1 ` |
the SE used when computing the confidence interval |

Claus Ekstrom [email protected]

Goodman, Leo A. and Kruskal, William H. (1954). "Measures of Association for Cross Classifications". Journal of the American Statistical Association 49 (268): 732-764.

1 2 3 4 5 6 | ```
# Data from the Glostrup study comparing smoking to overall health in males
smoke <- matrix(c(16, 15, 13, 10, 1, 73, 75, 59, 81, 29, 6, 6, 7, 17, 3, 1, 0, 1, 3, 1), ncol=4)
colnames(smoke) <- c("VGood", "Good", "Fair", "Bad") # General health status
rownames(smoke) <- c("Never", "No more", "1-14", "15-24", "25+") # Smoke amount
gkgamma(smoke)
chisq.test(smoke)
``` |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.