search for: contingency

Displaying 20 results from an estimated 494 matches for "contingency".

2009 Feb 24
2
Simulating contingency table (Basic question, help please)
I'd like to carry out a Monte Carlo simulation test where given data is a contingency table. I think this is something to do with using rmultinonom(), but I'm not sure how to code this, to simulate contingency tables. Could anyone please help with how to use R to simulate contingency tables like this? -- View this message in context: http://www.nabble.com/Simulating-contingency...
2012 May 28
2
import contingency table
hello everyone, i often work on contingency table that I create from data.frame (with table() function) but a friend sent me an excel sheet wich *already is* a contingency table (just a simple 2 way table !...) any clue on how to import it in R (keeping row names and col names) ? any tuto I come accross only mention the table transformati...
2008 Feb 14
3
contingency table
Hello! May you help me? I'm trying to do a contingency table using this > data(iris) > library(rpart) > modelo <- rpart(Species ~., iris) > prev <- predict(modelo, iris) Finally the contingency table > table(iris$Species, prev) But an error occurs: Error in table(iris$Species, prev) : all arguments must have the same lengt...
2006 Sep 28
0
mx2 contingency tables or (2^(m-1)-1)'s 2x2 contingency tables in the context of feature selection for random forest
...onsidering all combinations of its levels. So suppose again I have 1000 such multiple-leveled category variables and I need to do some feature selection. Then I would like to try chi-sqr tests (or information gain). To match the splitting method used in rf, I am thinking if I should simply use mx2 contingency table or (2^(m-1)-1)'s 2x2 contingency tables in which I pick the best p-value to evaluate A's power. For the latter, I am sure it is very alike the way used in rf. But is the former good enough? Thanks. -- Weiwei Shi, Ph.D Research Scientist GeneGO, Inc. "Did you always know?"...
2011 Mar 02
4
Contingency table in R
Hi, I have a table in R with data I needed and need to create a contingency table out of it. The table I have so far looks like this: Binger r DietType No Yes Dangerous 15 12 Healthy 52 9 None 134 24 Unhealthy 72 23 These are the error messages that I keep getting whenever I try to get a contingency table. I'm not sur...
2012 May 19
1
Contingency table and mean(sd)
Hi All, I have a question regarding contingency tables. I would like to calculate the mean and standard deviation of a continuous variable from my own dataset based on the percentages of a contingency table I obtained from a scientific article. dataset<- data.frame(cbind(case=rep(0:1,5), x1=c(1:10), x2=c(0:9))) contingency_table<- matrix(...
2005 Feb 15
1
Tests on contingency tables
Dear all, I have a dataset with qualitative variables (factors) and I want to test the null hypothesis of independance between two variables for each pair by using appropriate tests on contingency tables. I first applied chisq.test and obtained dependance in almost all cases with extremely small p-values and warning messages. > chisq.test(table(data$ins.f, data$ins.st))$p.val [1] 4.811263e-100 Warning message: Chi-squared approximation may be incorrect in: chisq.test(table(data$ins.f, d...
2009 Dec 09
1
Exporting Contingency Tables with xtable
Dear R-philes: I am having an issue with exporting contingency tables with xtable(). I set up a contingency and convert it to a matrix for passing to xtable() as shown below. v.cont.table <- table(v_lda$class, grps, dnn=c("predicted", "observed")) v.cont.mat <- as.matrix(v.cont.table) Both produce output as follows: obser...
2013 Mar 04
1
package ‘contingency.tables’ is not available (for R version 2.15.2)
I am trying to create contingency tables (to evaluate prior to performing Pearson's Chi-Squared test for independence). I would like to see column and row totals as well as expected and observed values and cell counts. I tried to use the package "contingency. tables" but get the following warning: package ‘contingenc...
2011 Feb 24
1
reshaping list into a contingency table
Hi all, I have been struggling with this problem for a few days. I have a data table like this: gene rpkm1 diff1 rpkm2 diff2 gene1 23 50 13 120 gene2 111 220 827 1200 gene3 75 998 71 910 And I want to re-format it so that, for each gene, I have a 2x2 contingency table, such as: gene rpkm diff gene1 23 50 gene1 13 120 gene2 111 220 gene2 827 1200 gene3 75 998 gene3 71 910 I have found one post with the same problem (http://r.789695.n4.nabble.com/R-Reshape-into-a-contingency-table-Fisher-s-test-td809122.html), but the response was very...
2012 Dec 01
4
Getting all possible contingency tables
Hello all, Let say I have 2-way contingency table: Tab <- matrix(c(8, 10, 12, 6), nr = 2) and the Chi-squared test could not reject the independence: > chisq.test(Tab) Pearson's Chi-squared test with Yates' continuity correction data: Tab X-squared = 1.0125, df = 1, p-value = 0.3143 However I want to get all p...
2000 Sep 20
1
SV: sample from contingency table
...p) TempSize <- size for(i in 1:NrDim) { TempP <- p[i]/sum(p[i:NrDim]) TempBin <- rbinom(n=n, size=TempSize, prob=TempP) TempSize <- TempSize-TempBin res[,i] <- TempBin } return(res) } # Then you can draw 10 samples like this, whith # each row representing a contingency table x <- as.matrix(1:4, nrow=2, ncol=2) rmulti(10, sum(x), x) Regin -----Oprindelig meddelelse----- Fra: Dirk F. Raetzel [mailto:raetzel at Mathematik.Uni-Marburg.de] Sendt: 19. september 2000 18:48 Til: R-Help Mailing List Emne: [R] sample from contingency table Hello, I have a multiv...
2000 Aug 23
1
3D perspective of a contingency table
How can I draw a 3D perspective of a contingency table, that is showing 3D bars whose height is in proportion of the table cells? --------------- Charles RAUX, Laboratoire d'Economie des Transports CNRS-Universit? Lumi?re Lyon 2-ENTPE email : charles.raux at let.ish-lyon.cnrs.fr http://www.ish-lyon.cnrs.fr/let -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-...
2003 Apr 24
3
Detailed contingency tables
Is there any existing function for creating contingency tables that will display counts, row, column, and cell percentages in the same tables....anything similar to crosstabs in S? Marc W. Zodet, MS Health Statistician Center for Cost and Financing Studies Division of Statistical Research and Methods 2101 East Jefferson Street, Suite 500 Rockville, Ma...
2010 May 24
1
high-dimensional contingency table
Dear Friends. I am just starting to use R. And in this occasion I want to construct a high-dimensional contingency table, because I want to crate a mosaic plot with the vcd package. My table is in this format: año ac.rep cat.gru conteos 1 2005 R parejas 253 2 2005 N parejas 23 3 2006 R parejas 347 4 2006 N parejas 39 5 2007 R parejas 266...
2008 Mar 18
1
ask for help how to get accumulate contingency table?
...(x,y,tr) data1<-data1[order(data1$tr),] > data1 x y tr 2 1 1 4 0 1 3 1 1 2 1 1 4 1 1 3 1 1 2 0 1 4 0 1 3 0 1 2 0 1 4 0 1 3 1 1 3 0 2 2 0 2 >table(data1) tr = 1 y x 0 1 2 2 2 3 1 3 4 3 1 tr = 2 y x 0 1 2 2 2 3 2 2 4 1 3 Question: How to get accumulate contingency table by variable "tr" in data1? e.g. how to get the following results. tr = 1 y x 0 1 2 2 2 3 1 3 4 3 1 tr = 2 y x 0 1 2 4 4 3 3 6 4 4 4 ... Thank you for your help. xj. _________________________________________________________________ Helping your favorite cau...
2004 Feb 17
2
Generating 2x2 contingency tables
Hello R-users, I would like to generate two-way contingency tables with zero in one cell. I tried to use the function r2dtable but I could not force one cell to have zero value. Any Idea? Best regards.. Mahmoud [[alternative HTML version deleted]]
2011 Apr 06
1
Creating a symmetric contingency table from two vectors with different length of levels in R
Hello, How can I create a symmetric contingency table from two categorical vectors having different length of levels? For example one vector has 98 levels TotalData1$Taxa.1 [1] "Aconoidasida" "Actinobacteria (class)" "Actinopterygii" "Alphaproteobacteria" [5] "A...
2006 Oct 17
1
Convert Contingency Table to Flat File
Hello All, Is there any R function out there to turn a multi-way contingency table back to a flat file table of individual rows and attribute columns.? Thanks! marco --------------------------------- [[alternative HTML version deleted]]
2011 Dec 28
2
Contingency tables example
...gen and I'm asked to analyse the data with a view to seeing what might be related to residents satisfaction levels. And I just don't know where to start, if anyone could help this would be greatly appreciated Regards Sam -- View this message in context: http://r.789695.n4.nabble.com/Contingency-tables-example-tp4240145p4240145.html Sent from the R help mailing list archive at Nabble.com.