Learn R Programming

asbio (version 0.4-11)

G.stat: G-tests

Description

Performs G-tests for contingency table analyses.

Usage

G.stat(y)

Arguments

y
A matrix containing a contingency table.

Value

  • GThe G test statistic (i.e. 2*the likelihood ratio).
  • lik.ratio.p.valueP-value for the test.

Details

In two-way tables the data are arranged so that the c factor levels from the explanatory variable are in columns and the r response variable categories are in rows. Experimental unit responses are counts within the contingency table.

References

Zar, J. H. (1999) Biostatistical Analysis, 4th ed. Prentice-Hall.

Examples

Run this code
jugularis<-matrix(nrow=2,ncol=2,data=c(20,0,29,21),byrow=TRUE)
G.stat(jugularis)

Run the code above in your browser using DataLab