[R] Find if there is independence
vito.muggeo at giustizia.it
Fri May 24 09:47:18 CEST 2002
your problem concerns making inference in nonstandard situations, such a
sparse data, sampling zeros and small sample size, where asymptotic theory
A conditional approach, i.e. Fisher test for contigency tables, might be the
best solution (and the only one in my experience), although some author does
not rely on conditional principle. The alternative unconditional exact
approach is computationally proibitive for non-2x2 tables.
StatXact is specifically designed for these nonstandard analyses.
However in practice it is suggested that if the three tests (LRT, Score,
Wald) yield the same p-value, asymptotics results may be used.
----- Original Message -----
From: "Ambrosini Alessandro" <klavan at tiscalinet.it>
To: "R-help" <R-help at stat.math.ethz.ch>
Sent: Thursday, May 23, 2002 9:27 PM
Subject: [R] Find if there is independence
> I have the matrix
> [,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
> 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
> By the way, which is the simplest command to use to study the independence
> in a matrix like the one that I wrote?
> > 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
> And in which value I can understand the level of the dependence?
> Thank you
> r-help mailing list -- Read
> Send "info", "help", or "[un]subscribe"
> (in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch
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