[R] Find if there is independence
    Ambrosini Alessandro 
    klavan at tiscalinet.it
       
    Thu May 23 21:27:39 CEST 2002
    
    
  
Hello
I have the matrix
a<-matrix(c(2,1,0,1,2,2,1,5,7,2,5,12),nrow=6)
a
      [,1] [,2]
[1,]    2    1
[2,]    1    5
[3,]    0    7
[4,]    1    2
[5,]    2    5
[6,]    2   12
Suppose that in the first row we have 3 men of England, 2 with hair, and 1
no
In the second we have 6 italian men, 1 with hair and 5 no ...
I want to find if there is a dependence between men withouth hair and
nationality.
By the way, which is the simplest command to use to study the independence
in a matrix like the one that I wrote?
Using
> chisq.test(a)
        Pearson's Chi-squared test with Yates' continuity correction
data:  a
X-squared = 0, df = 1, p-value = 1
Warning message:
Chi-squared approximation may be incorrect in: chisq.test(a)
Why does it give me the warning message? What have to add into chisq.test(a)
?
And in which value I can understand the level of the dependence?
Thank you
Alessandro
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
    
    
More information about the R-help
mailing list