Displaying 20 results from an estimated 10000 matches similar to: "chisq.test, basic question"
2001 Dec 18
4
chi-squared test
I don't quite understand the difference between the two methods for
performing a chi-squared test on contingency tables: summary(table())
and chisq.test()
They may different results. E.g.:
aa <- gl(2, 10)
bb <- as.factor(c(1,2,2,2,1,2,1,2,2,2,1,2,2,2,1,1,1,2,1,1))
aa <- c(aa, aa)
bb <- c(bb, bb)
table(aa, bb)
summary(table(aa, bb))
chisq.test(aa, bb)
Could somebody give me
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
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),
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 Apr 10
1
compare two matrices
Dear Members,
I have two estimated transition matrices and I want to compare them.
In fact I want to check the hypothesis if they come from the same process.
I tried to look for some test but all I found was independence test of
contingency tables.
The following code shows that the usual chi-squared test statistic does
not follow chisq distribution.
MCRepl <- 5000
khi12 <- rep(0,MCRepl)
2002 Nov 06
2
chisq.test on a matrix
Hello!
What kind of calculation perform 'chisq.test', if its argument is a matrix?
Thanks for any suggestion!
------------------------------------------------------------
Sincerely yours.
Dr. Alessandro Semeria Tel. +39 544 536811
Models and Simulation Lab of Fax. +39 544
538663
The Environment Research Center - Montecatini
2004 Oct 09
2
Is it safe? Cochran etc
I have the following contingency table
dat <- matrix(c(1,506,13714,878702),nr=2)
And I want to test if their is an association between events
A:{a,not(a)} and B:{b,not(b)}
| b | not(b) |
--------+-----+--------+
a | 1 | 13714 |
--------+-----+--------+
not(a) | 506 | 878702 |
--------+-----+--------+
I am worried that prop.test and chisq.test are not valid given the
2005 Jan 13
2
chisq.test() as a goodness of fit test
Dear R-Users,
How can I use chisq.test() as a goodness of fit test?
Reading man-page I?ve some doubts that kind of test is
available with this statement. Am I wrong?
X2=sum((O-E)^2)/E)
O=empirical frequencies
E=expected freq. calculated with the model (such as
normal distribution)
See:
http://www.itl.nist.gov/div898/handbook/eda/section3/eda35f.htm
for X2 used as a goodness of fit test.
Any
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))
>
2005 Dec 06
3
Coefficient of association for 2x2 contingency tables
Hi,
Found no measure of association or correlation for 2x2 contingency tables in
fullrefman.pdf or google. Can someone point to a package that implements such
calculations?
Thanx.
--
Alexandre Santos Aguiar
- consultoria para pesquisa em sa??de -
R Botucatu, 591 cj 81
tel 11-9320-2046
fax 11-5549-8760
www.spsconsultoria.com
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,
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,
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() doesn''t provide more
options to solve this problem. Or, the only choice is
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
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
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(
2007 Feb 27
1
prop.test or chisq.test ..?
Hi everyone,
Suppose I have a count the occurrences of positive results, and the total
number of occurrences:
pos <- 14
total <- 15
testing that the proportion of positive occurrences is greater than 0.5 gives
a p-value and confidence interval:
prop.test( pos, total, p=0.5, alternative='greater')
1-sample proportions test with continuity correction
data: 14 out of
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
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]]