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

Chi-square and G-square tests of (unconditional) indepdence.

1 |

`x` |
A numerical vector or a factor variable with data. The data must be consecutive numbers. |

`y` |
A numerical vector or a factor variable with data. The data must be consecutive numbers. |

`logged` |
Should the p-values be returned (FALSE) or their logarithm (TRUE)? |

The function calculates the test statistic of the *χ^2* and the *G^2* tests of unconditional
independence between x and y. x and y need not be numerical vectors like in `g2Test`

. This
function is more close to the spirit of MASS' `loglm`

function which calculates both statistics
using Poisson log-linear models (Tsagris, 2017).

A matrix with two rows. In each row the X2 or G2 test statistic, its p-value and the degrees of freedom are returned.

Manos Papadakis and Michail Tsagris

R implementation and documentation: Manos Papadakis <papadakm95@gmail.com> and Michail Tsagris <mtsagris@uoc.gr>.

Tsagris M. (2017). Conditional independence test for categorical data using Poisson log-linear model. Journal of Data Science, 15(2):347-356.

```
g2Test_univariate, g2Test_univariate_perm, g2Test
```

1 2 3 4 5 6 7 8 9 10 |

```
Loading required package: Rcpp
Loading required package: RcppZiggurat
```

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.