similar to: The two chisq.test p values differ when the contingency table (PR#3896)

Displaying 20 results from an estimated 1000 matches similar to: "The two chisq.test p values differ when the contingency table (PR#3896)"

2003 Jul 16
1
The two chisq.test p values differ when the contingency table is transposed! (PR#3486)
Full_Name: Tao Shi Version: 1.7.0 OS: Windows XP Professional Submission from: (NULL) (149.142.163.65) > x [,1] [,2] [1,] 149 151 [2,] 1 8 > c2x<-chisq.test(x, simulate.p.value=T, B=100000)$p.value > for(i in (1:20)){c2x<-c(c2x,chisq.test(x, simulate.p.value=T,B=100000)$p.value)} > c2tx<-chisq.test(t(x), simulate.p.value=T, B=100000)$p.value > for(i in
2003 Jul 15
0
Why two chisq.test p values differ when the contingency
Hi Tao: The P-values for 2x2 table are generated based on a random (discrete uniform distribution) sampling of all possible 2x2 tables, conditioning on the observed margin totals. If one of the cells is extremely small, as in your case, you get a big difference in P-values. Suppose, you changed the cell with value 1 to, say, 5 or 6, then the two P-values are nearly the same. However, I
2003 Jul 15
1
Why two chisq.test p values differ when the contingency table is transposed?
I'm using R1.7.0 runing with Win XP. Thanks, ...Tao ???????????????????????????????????????????????????????? >x [,1] [,2] [1,] 149 151 [2,] 1 8 >t(x) [,1] [,2] [1,] 149 1 [2,] 151 8 >chisq.test(x, simulate.p.value=T, B=100000) Pearson's Chi-squared test with simulated p-value (based on 1e+05 replicates) data: x X-squared = 5.2001, df =
2017 Dec 28
1
Numerical stability in chisq.test
> On 28 Dec 2017, at 13:08 , Kurt Hornik <Kurt.Hornik at wu.ac.at> wrote: > >>>>>> Jan Motl writes: > >> The chisq.test on line 57 contains following code: >> STATISTIC <- sum(sort((x - E)^2/E, decreasing = TRUE)) > > The preceding 2 lines seem relevant: > > ## Sorting before summing may look strange, but seems to be >
2004 Mar 09
1
bug(?) in chisq.test
This is a message for whoever maintains "chisq.test": For an outcome more extreme than 2000 simulations, a Monte Carlo p-value of "< 2.2e-16" was printed. Ripley said the proper p-value for such cases should be 1/(B+1) = 1/2001. This can be easily fixed by adding "if(PVAL==0)PVAL <- 1/(B+1)" right after the following line in the code for chisq.test (in R
2007 May 18
1
How to extract R codes that embedded in a HTML file
> -------- Original Message -------- > Subject: Re: [R] How to extract R codes that embedded in a HTML file > using Stangle? > Date: Thu, 17 May 2007 17:01:30 +0000 > From: Tao Shi <shitao at hotmail.com> > To: ligges at statistik.uni-dortmund.de, lecoutre at stat.ucl.ac.be > CC: r-help at stat.math.ethz.ch > : <jmcconnell at
2019 Sep 20
0
sscanf/stroul (was: Re: [PATCH nbdkit v3 2/3] Add new retry filter.)
On Thu, Sep 19, 2019 at 11:32:47AM -0500, Eric Blake wrote: > > +static int > > +retry_config (nbdkit_next_config *next, void *nxdata, > > + const char *key, const char *value) > > +{ > > + int r; > > + > > + if (strcmp (key, "retries") == 0) { > > + if (sscanf (value, "%d", &retries) != 1 || retries < 0)
2005 Oct 20
3
numerical issues in chisq.test(simulate=TRUE) (PR#8224)
Hi, This report deals with p-values coming from chisq.test using the simulate.p=TRUE option. The issue is numerical accuracy and was brought up in previous bug reports 3486 and 3896. The bug was considered fixed but apparently was only mostly fixed. Just the typical problem of two values that are mathematically equal not ending up numerically equivalent. Consider this series of three 2x2
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
Dear Listers: I have a categorical feature selection problem for random forest. Suppose I have a multiple-leveled category variable A, which has m=3 levels: red, green, and blue and the final target is binary classification. I want to evaluate its power in discrimination between 2 classes. We know rf splits multiple-leveled category variable by considering all combinations of its levels. So
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:
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(c(100, 75, 65, 85, 90, 87), nrow=3, ncol=3) In
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: observed predicted uh uh~ uh 201
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 ‘contingency.tables’ is not available (for R versions 2.15.2) Is there
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, Maryland 20852 Phone: 301-594-7072 Fax:
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
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]]
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] "Amoebozoa"
2011 Dec 28
2
Contingency tables example
I have this question: http://r.789695.n4.nabble.com/file/n4240145/data%5D.jpg This table and data represents a sample of social housing residents in Copenhagen 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 --