search for: chisq

Displaying 20 results from an estimated 655 matches for "chisq".

2012 Jun 26
5
chisq.test
Dear list! I would like to calculate "chisq.test" on simple data set with 70 observations, but the output is ''Warning message:'' Warning message: In chisq.test(tabele) : Chi-squared approximation may be incorrect Here is an example:         tabele <- matrix(c(11, 3, 3, 18, 3, 6, 5, 21), ncol = 4, byrow = TRUE)  ...
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 equiva...
2008 Nov 16
3
chisq.test with simulate.p.value=TRUE (PR#13292)
Full_Name: Reginaldo Constantino Version: 2.8.0 OS: Ubuntu Hardy (32 bit, kernel 2.6.24) Submission from: (NULL) (189.61.88.2) For many tables, chisq.test with simulate.p.value=TRUE gives a p value that is obviously incorrect and inversely proportional to the number of replicates: > data(HairEyeColor) > x <- margin.table(HairEyeColor, c(1, 2)) > chisq.test(x,simulate.p.value=TRUE,B=2000) Pearson's Chi-squared test with s...
2005 Jun 22
1
chisq test and fisher exact test
...lecting a set of words or word combinations which have better discriminant capability than other words in telling the group id's (2 classes in this case) for a dataset which has 2,000,000 documents. One approach is using "contrast-set association rule mining" while the other is using chisqr or fisher exact test. An example which has 3 contingency tables for 3 words as followed (word coded by number): > tab[,,1:3] , , 1 [,1] [,2] [1,] 11266 2151526 [2,] 125 31734 , , 2 [,1] [,2] [1,] 43571 2119221 [2,] 52 31807 , , 3 [,1] [,2] [1,] 427 2162...
2003 Mar 26
3
a statistic question about chisq.test()
Hi, In the chisq.test(), if the expected frequency for some categories is <5, there will be a warning message which says Warning message: Chi-squared approximation may be incorrect in: chisq.test(x, p = probs) I am wondering whether there are some methods to get rid of this mistake... Seems the ?chisq.test() d...
2006 Dec 02
1
Chi-squared approximation may be incorrect in: chisq.test(x)
I am getting "Chi-squared approximation may be incorrect in: chisq.test(x)" with the data bleow. Frequency distribution of number of male offspring in families of size 5. Number of Male Offspring N 0 518 1 2245 2 4621 3 4753 4...
2003 Dec 09
2
p-value from chisq.test working strangely on 1.8.1
Hello everybody, I'm seeing some strange behavior on R 1.8.1 on Intel/Linux compiled with gcc 3.2.2. The p-value calculated from the chisq.test function is incorrect for some input values: > chisq.test(matrix(c(0, 1, 1, 12555), 2, 2), simulate.p.value=TRUE) Pearson's Chi-squared test with simulated p-value (based on 2000 replicates) data: matrix(c(0, 1, 1, 12555), 2, 2) X-squared = 1e-04, df = NA, p-va...
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 > ## a sensible way to deal with rounding issu...
2008 Feb 14
0
help in simplyfiying programme
...ime)~treatgrp ,data=b,rho=1.5) c8= survdiff(Surv(eventTime,censoring)~treatgrp ,data=b,rho=-2) c88= survdiff(Surv(eventTime)~treatgrp ,data=b,rho=-2) c9= survdiff(Surv(eventTime,censoring)~treatgrp ,data=b,rho=2) c99= survdiff(Surv(eventTime)~treatgrp ,data=b,rho=2) if(sqrt(c1$chisq)>1.96){count1=count1+1} if(sqrt(c11$chisq)>1.96){count11=count11+1} if(sqrt(c2$chisq)>1.96){count2=count2+1} if(sqrt(c22$chisq)>1.96){count22=count22+1} if(sqrt(c3$chisq)>1.96){count3=count3+1} if(sqrt(c33$chisq)>1.96){count33=count33+1} if(sqrt(c4$chisq)>1.96){c...
2003 Jul 15
0
Why two chisq.test p values differ when the contingency
...be so different, since the set of all possible 2x2 tables will be the same in both cases. I would be interested in knowing how this happens. Ravi. ----- Original Message ----- From: "Shi, Tao" <shidaxia at yahoo.com> Date: Tuesday, July 15, 2003 4:37 pm Subject: RE: [R] Why two chisq.test p values differ when the contingency > Hi, Ted and Dennis: > > Thanks for your speedy replies! I don't think this happens just > randomly, rather, I'm thinking it may be due to the way chisq.test > function handles simulation. Here shows why: (Ted, I think there &...
2002 Jul 30
4
chisq.test, basic question
The cells are interpreted as counts, so by scaling you're analyzing a different experiment (one with fewer observations). So the chi-squared value will change (the terms (O-E)^2/E in the statistic scale linearly ignoring rounding and "Yates' continuity correction"). The chisq.test on the original data is a test of association. Conventionally you decide ahead of time on a threshold for "false positives", say 5%, then use the reported p-value to determine whether to accept or reject the null hypothesis of no association. Had you chosen 5%, since the reported p-v...
2014 May 07
3
historical significance of Pr(>Chisq) < 2.2e-16
Where does the value 2.2e-16 come from in p-values for chisq tests such as those reported below? > Anova(cm.mod2) Analysis of Deviance Table (Type II tests) Response: Freq LR Chisq Df Pr(>Chisq) B 11026.2 1 < 2.2e-16 *** W 7037.5 1 < 2.2e-16 *** Age 886.6 8 < 2.2e-16 *** B:W 3025.2 1 < 2.2e-16 *** B:Age 1130.4 8 < 2.2e-16 *** W:Age 3...
2008 Jan 17
1
'simulate.p.value' for goodness of fit
R Help on 'chisq.test' states that "if 'simulate.p.value' is 'TRUE', the p-value is computed by Monte Carlo simulation with 'B' replicates. In the contingency table case this is done by random sampling from the set of all contingency tables with given marginals,...
2005 Jun 26
2
chisq.test using amalgamation automatically (possible ?!?)
Dear List, If any of observed and/or expected data has less than 5 frequencies, then chisq.test (Pearson's Chi-squared Test for Count Data from package:stats) gives warning messages. For example, x<-c(10, 14, 10, 11, 11, 7, 8, 4, 1, 4, 4, 2, 1, 1, 2, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1) y<-c(9.13112391745095, 13.1626482033341, 12.6623267638188, 11.0130706413029, 9.1641592513901...
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 (1:20)){c2tx<-c(c2tx,chisq.test(t(x), simulate.p.value=T, + B=100000)$p.value)...
2005 Oct 20
3
different F test in drop1 and anova
Hi, I was wondering why anova() and drop1() give different tail probabilities for F tests. I guess overdispersion is calculated differently in the following example, but why? Thanks for any advice, Tom For example: > x<-c(2,3,4,5,6) > y<-c(0,1,0,0,1) > b1<-glm(y~x,binomial) > b2<-glm(y~1,binomial) > drop1(b1,test="F") Single term deletions Model: y ~
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 = NA, p-value = 0.03774 >chisq.test(t(x), simulate.p.value=T, B=100000) Pearson's Chi-squared test with simulated p-val...
2008 Jan 08
1
A question on chisq.test
Dear all, I would like to do a goodness-of-fit test on my data to see if they follow a mixture of 2 poisson distributions. I have small numbers for observed values. Most of them <5. The chisq.test gives warning message: Chi-squared approximation may be incorrect in: chisq.test(x , p = prob). However, the option sim=TURE would suppress the warning message. Does that mean with the option sim=TURE, the result from chisq.test is valid, even though most of the cell counts <5? Thank you...
2008 Feb 07
3
how to calculate chisq value in R
for example, an expression such as chisq(df=1,ncp=0) ? thanks -- View this message in context: http://www.nabble.com/how-to-calculate-chisq-value-in-R-tp15338943p15338943.html Sent from the R help mailing list archive at Nabble.com.
2009 May 09
2
need help with chisq
I am very new to R. I have some data from a CVS stored in vdata with 4 columns labeled: X08, Y08, X09, Y09. I have created two new "columns" like so: Z08 <- (vdata$X08-vdata$Y08) Z09 <- (vdata$X09-vdata$Y09) I would like to use chisq.test for each "row" and output the p-value for each in a stored variable. I don't know how to do it. Can you help? so far I have done it for one row (but I want it done automatically for all my data): chidata=rbind(c(vdata$Y08[1],Z08[1]),c(vdata$Y09[1],Z09[1])) results <- chisq.t...