Brian Smith
2013-Mar-12 13:22 UTC
[R] Testing for significance of overlap in three sets - mantelhaen test?
Hi, My apologies for the naive question! I have three overlapping sets and I want to find the probability of finding a larger/greater intersection for 'A intersect B intersect C' (in the example below, I want to find the probability of finding more than 135 elements that are common in sets A, B & C). For a two set problem, I guess I would do a Fisher or chi-square test. Here is what I have attempted so far: ################# ### Prepare a 3 way contingency table: mytable <- array(c(135,116,385,6256, 48,97,274,9555), dim = c(2,2,2), dimnames = list( Is_C = c('Yes','No'), Is_B = c('Yes','No'), Is_A = c('Yes','No'))) ## test mantelhaen.test(myrabbit, exact = TRUE, alternative = "greater") ###################### end code Is this the right test (alongwith the current parameters) to determine what I want or is there a more appropriate test for this? many thanks!! [[alternative HTML version deleted]]
Bert Gunter
2013-Mar-12 13:49 UTC
[R] Testing for significance of overlap in three sets - mantelhaen test?
As this seems to be a statistics, not an R, question, it is off topic here. Post on a statistics list like stats.stackexchange.com instead. -- Bert On Tue, Mar 12, 2013 at 6:22 AM, Brian Smith <bsmith030465 at gmail.com> wrote:> Hi, > > My apologies for the naive question! > > I have three overlapping sets and I want to find the probability of finding > a larger/greater intersection for 'A intersect B intersect C' (in the > example below, I want to find the probability of finding more than 135 > elements that are common in sets A, B & C). For a two set problem, I guess > I would do a Fisher or chi-square test. Here is what I have attempted so > far: > > ################# > > ### Prepare a 3 way contingency table: > mytable <- array(c(135,116,385,6256, > 48,97,274,9555), > dim = c(2,2,2), > dimnames = list( > Is_C = c('Yes','No'), > Is_B = c('Yes','No'), > Is_A = c('Yes','No'))) > > ## test > mantelhaen.test(myrabbit, exact = TRUE, alternative = "greater") > > ###################### end code > > Is this the right test (alongwith the current parameters) to determine what > I want or is there a more appropriate test for this? > > > > many thanks!! > > [[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.-- Bert Gunter Genentech Nonclinical Biostatistics Internal Contact Info: Phone: 467-7374 Website: http://pharmadevelopment.roche.com/index/pdb/pdb-functional-groups/pdb-biostatistics/pdb-ncb-home.htm
Possibly Parallel Threads
- exact conditional mantelhaen.test estimate is 0 ?!
- About continuity correction option in the mantelhaen.test function.
- creating 3-way tables for mantelhaen.test
- mantelhaen.test for more than two groups?
- How to save results from chisq.test or mantelhaen.test to file