Skip to content

Instantly share code, notes, and snippets.

@NyaGarcia
Last active March 19, 2020 15:24
Show Gist options
  • Save NyaGarcia/d2f0f3e52f73322e594f7201069d7873 to your computer and use it in GitHub Desktop.
Save NyaGarcia/d2f0f3e52f73322e594f7201069d7873 to your computer and use it in GitHub Desktop.
Performing the Gtest for independence between gears and cylinders
> library(DescTools)
> GTest(mtcars$gear, mtcars$cyl)
Log likelihood ratio (G-test) test of independence without
correction
data: mtcars$gear and mtcars$cyl
G = 23.26, X-squared df = 4, p-value = 0.0001123
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment