This function carries out goodness-of-fit tests for contingency tables from the power-divergence family.

gof_test(lambda, observes, theoriques)

Arguments

lambda

parameter defining the statistic to be used: lambda = -0.5 is for the Freeman-Tuckey statistic, lambda = 0 for the G2 statistic, lambda = 2/3 for the Cressie-Read statistic and lambda = 1 for the classical Chi-square statistic

observes

vector of observed probabilities

theoriques

vector of theoretical/expected probabilities

Value

This function returns the value of the goodness-of-fit statistic.

Author

Olivier Gimenez <olivier.gimenez@cefe.cnrs.fr>, Roger Pradel, Rémi Choquet