Displaying 20 results from an estimated 11000 matches similar to: "a statistic question about chisq.test()"
2003 Mar 27
0
a statistic question about chisq.test() (aprilsun)
The Chisquare test is based upon a normal approx of the (essentially) binomial
distribution for the data in question. Small EXPECTED (not observed) values
(<5) suggest a asymetric distribution and potential errors in inferential
conclusions. The alternative is the exact test, which calculates the exact
probabilities of the observed distribution, or a more extreme one, given the
constraining
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)
dimnames(tabela) <- list(
2012 Feb 20
1
chisq.test vs manual calculation - why are different results produced?
Hello,
I am trying to fit gamma, negative exponential and inverse power functions
to a dataset, and then test whether the fit of each curve is good. To do
this I have been advised to calculate predicted values for bins of data (I
have grouped a continuous range of distances into 1km bins), and then apply
a chi-squared test. Example:
> data <- data.frame(distance=c(1,2,3,4,5,6,7),
2005 Jun 22
1
chisq test and fisher exact test
Hi,
I have a text mining project and currently I am working on feature
generation/selection part.
My plan is selecting 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
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 2476
5
2005 Oct 30
4
Yates' correction for continuity in chisq.test (PR#8265)
Full_Name: foo ba baz
Version: R2.2.0
OS: Mac OS X (10.4)
Submission from: (NULL) (219.66.32.183)
chisq.test(matrix(c(9,10,9,11),2,2))
Chi-square value must be 0, and, P value must be 0
R does over correction
when | a d - b c | < n / 2 ,chi-sq must be 0
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.16415925139016,
2008 Jan 15
2
In chisq.test(x) : Chi-squared approximation may be incorrect
Hello,
I received the following warning when running chi-square;
n Is there a way to catch the 'error' code of 'warning' after run
chisq.test(x)?
n What does this error mean?
Thank you for your help.
[[alternative HTML version deleted]]
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
2005 Dec 20
2
2 x 2 chisq.test (PR#8415)
Full_Name: nobody
Version: 2.2.0
OS: any
Submission from: (NULL) (219.66.34.183)
2 x 2 table, such as
> x
[,1] [,2]
[1,] 10 12
[2,] 11 13
> chisq.test(x)
Pearson's Chi-squared test with Yates'
continuity correction
data: x
X-squared = 0.0732, df = 1, p-value = 0.7868
but, X-squared = 0.0732 is over corrected.
when abs(a*d-b*c) <= sum(a,b,c,d), chisq.value
2003 Mar 25
2
How to write the output of a function into a file?
I cannot find the solutions in the mannual about "import and export of data".
For example, I run
>chisq.test(x,p=probs)
chi-squared.....
.........
How can I write the output into a file? Is there some file operations in R?
Actually, I only want to save the P-value. But I don''t know how I can extract the P-value field only from the output
of chisq.test. So, I think I
2005 Aug 12
1
chisq warning
Hi
I am running chisq as below and getting a warning. Can anyone tell me
the significance or the warning?
> chisq.test(c(10 ,4 ,2 ,6 ,5 ,3 ,4 ,4 ,6 ,3 ,2 ,2 ,2 ,4 ,7 ,10 ,0 ,6
,19 ,3 ,2 ,7 ,2 ,2 ,2 ,1 ,32 ,2 ,3 ,10 ,1 ,3 ,9 ,4 ,10 ,2 ,2 ,4 ,5 ,7 ,6
,3 ,7 ,4 ,3 ,3 ,7 ,1 ,4 ,2 ,2 ,3 ,3 ,5 ,5 ,4 ), p =c(0.01704142
,0.017988166 ,0.018224852 ,0.017751479 ,0.017988166 ,0.018224852
,0.017278107
2010 Aug 24
2
chisq.test on samples of different lengths
Hello,
I am trying to see whether there has been a significant difference in whether people experienced damages from wildlife in two different years. I therefore have two columns:
year 1:
yes
no
no
no
yes
yes
no
year 2:
no
yes
no
yes
I wanted to do a chisq.test, but if I enter it this way:
chisq.test(year1, year2)
I get the error saying the columns are two different lengths. So then I tried
2003 Apr 22
4
fisher exact vs. simulated chi-square
Dear All,
I have a problem understanding the difference between the outcome of a
fisher exact test and a chi-square test (with simulated p.value).
For some sample data (see below), fisher reports p=.02337. The normal
chi-square test complains about "approximation may be incorrect",
because there is a column with cells with very small values. I
therefore tried the chi-square with
2012 Aug 20
1
The difference between chisq.test binom.test and pbinom
Hello all,
I am trying to understand the different results I am getting from the
following 3 commands:
chisq.test(c(62,50), p = c(0.512,1-0.512), correct = F) # p-value = 0.3788
binom.test(x=62,n=112, p= 0.512) # p-value = 0.3961
2*(1-pbinom(62,112, .512)) # p-value = 0.329
Well, the binom.test was supposed to be "exact" and give the same results
as the pbinom, while the chisq.test
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,
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))
>
2002 May 23
2
Find if there is independence
Hello
I have the matrix
a<-matrix(c(2,1,0,1,2,2,1,5,7,2,5,12),nrow=6)
a
[,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
no
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
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 =
2012 May 04
2
Binomial GLM, chisq.test, or?
Hi,
I have a data set with 999 observations, for each of them I have data on
four variables:
site, colony, gender (quite a few NA values), and cohort.
This is how the data set looks like:
> str(dispersal)
'data.frame': 999 obs. of 4 variables:
$ site : Factor w/ 2 levels "1","2": 1 1 1 1 1 1 1 1 2 2 ...
$ gender: Factor w/ 2 levels "0","1":