Learn R Programming

aspi (version 0.2.0)

g.test: Replicated G-tests of goodness-of-fit

Description

Perform replicated G-tests of goodness-of-fit to assess symmetry of parasitic infections.

Usage

g.test(x)

Arguments

x
a matrix or data frame with two numeric columns; first column is for left-side and 2nd column for right-side. Identifiers for hosts can be provided as row names.

Value

A list containing two data.frames:

Details

This function implements Sokal & Rohlf's (1995) G-test for the specific case of an expected 1:1 ratio The function takes as its argument a matrix or data frame with two numeric columns; first column is for left-side and 2nd column for right-side. Identifiers for hosts can be provided as row names. Uninfected hosts (zero count for both left and right sides) are ignored. Cannot be applied to data containing zero counts; use eb.test instead.

References

R.R. Sokal & F.J. Rohlf (1995) Biometry. 3rd Edition. New York: W.H. Freeman and Company. 887 pp.

Examples

Run this code
g.test(diplostomum_eyes_excl_lenses)

Run the code above in your browser using DataLab