[R] chisq.test

David Winsemius dwinsemius at comcast.net
Wed Jun 27 00:59:04 CEST 2012


On Jun 26, 2012, at 2:27 PM, Omphalodes Verna wrote:

> 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.

Read any introductory stats book regarding  small cell sizes:

      [,1] [,2] [,3] [,4]
[1,]   11    3    3    5
[2,]    3   18    6   21
>


-- 

David Winsemius, MD
West Hartford, CT



More information about the R-help mailing list