[R] chisq.test

arun smartpink111 at yahoo.com
Tue Jun 26 22:54:05 CEST 2012



Hi,

The error is due to less than 5 observations in some cells.

You can try,
fisher.test(tabele)
    Fisher's Exact Test for Count Data

data:  tabele 
p-value = 0.0998
alternative hypothesis: two.sided 

A.K.



----- Original Message -----
From: Omphalodes Verna <omphalodes.verna at yahoo.com>
To: "r-help at r-project.org" <r-help at r-project.org>
Cc: 
Sent: Tuesday, June 26, 2012 2:27 PM
Subject: [R] chisq.test

Dear list!

I would like to calculate "chisq.test" on simple data set with 70 observations, but the output is ''Warning message:''

Warning message:
In chisq.test(tabele) : Chi-squared approximation may be incorrect


Here is an example: 

        tabele <- matrix(c(11, 3, 3, 18, 3, 6, 5, 21), ncol = 4, byrow = TRUE)
        dimnames(tabela) <- list(
        "SEX" = c("M","F"),
        "HAIR" = c("Brown", "Black", "Red", "Blonde"))
        addmargins(tabele)
        prop.table(tabele)
        chisq.test(tabele)
Please, give me an advice / suggestion / recommendation.

Thanks a lot to all, OV

    [[alternative HTML version deleted]]


______________________________________________
R-help at r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.




More information about the R-help mailing list