User Tools

Site Tools


r:chi-square_test:code02

This is an old revision of the document!


####################
file_path <- "https://www.sthda.com/sthda/RDoc/data/housetasks.txt"
housetasks <- read.delim(file_path, row.names = 1)
housetasks

chisq <- chisq.test(housetasks)
chisq

o <- chisq$observed
e <- chisq$expected
o
round(e,2)
cs.cal <- sum((e-o)^2/e)
cs.cal
pchisq(cs.cal, 12*3, lower.tail = F)
chisq

r/chi-square_test/code02.1764715454.txt.gz · Last modified: by hkimscil

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki