I'm working with UFO Sightings data set and my goal is to verify if the Shape of UFO ("circle", "cone"...) depends on the Duration of Sight (in seconds). To do that, I decided to perform a Chi-Square Independence Test, where the H0: "independant" and H1: "dependant". Code:
tab <- table(newData$durationSec,newData$shape)
chisq.test(tab, correct=FALSE)
A contingency table (variable tab) is strange and I'm not sure if I'm perform the test correctly.
And finally, the result of test:
p-value is very small, so H0 is rejected and variable are dependant. Is is correct or something is wrong? Also, may I do the same, but for three variables? Let's suppose I want to test if Shape is depend simultaneously on the Duration (seconds) and the State (characters).
Warning message
. $\endgroup$