Description Usage Arguments Value Author(s) See Also Examples

View source: R/contingency.tables.R

Performs a likelihood ratio test of independence

1 | ```
likelihood.test(x,y=NULL,conservative=FALSE)
``` |

`x` |
A vector or a matrix |

`y` |
A vector that is ignored if x is a matrix and required if x is a vector |

`conservative` |
If |

A list with class "htest" containing the following components:

`statistic` |
the value the chi-squared test statistic. |

`parameter` |
the degrees of freedom of the approximate chi-squared distribution of the test statistic. |

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

`method` |
a character string indicating the type of test performed, and whether the continuity correction was used. |

`data.name` |
a character string giving the name(s) of the data. |

Pete Hurd and Ian Fellows

1 2 | ```
data(InsectSprays)
likelihood.test(InsectSprays$count>7,InsectSprays$spray)
``` |

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.