Displaying 20 results from an estimated 100 matches similar to: "anova.glm gets test="Chisq" wrong (PR#2294)"
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
2002 Dec 02
1
Monte Carlo chisq test
Dear all,
I have a question about the chisq.test command. As an option one can
chose the computation of p-values by Monte-Carlo simulation
(simulate.p.value=T). Is there any documentation available how this
calculations are done and how this simulation based test behaves in
small samples?
Thanks
Klaus Abberger
University of Konstanz, Germany
[[alternate HTML version deleted]]
2017 Dec 27
0
Numerical stability in chisq.test
The chisq.test contains following code:
STATISTIC <- sum(sort((x - E)^2/E, decreasing = TRUE))
However, based on book Accuracy and stability of numerical algorithms <http://ftp.demec.ufpr.br/CFD/bibliografia/Higham_2002_Accuracy%20and%20Stability%20of%20Numerical%20Algorithms.pdf> Table 4.1 on page 89, it is better to sort the data in increasing order than in decreasing order, when the
2002 Dec 04
1
documentation bug in (ctest) chisq.test (PR#2346)
chisq.test with simulate.p.value=TRUE uses the Patefield algorithm, this
is not documented, and the original reference is not given, as it ought
to be. The reference is:
Patefield,W. M. (1981) An efficient method of generating r * c tables
with given row and column totals (algorithm AS 159). Applied Statistics
30, 91-97.
Kjetil Halvorsen
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 Aug 21
0
The two chisq.test p values differ when the contingency table (PR#3896)
>>>>> dmurdoch writes:
>> Date: Wed, 16 Jul 2003 01:27:25 +0200 (MET DST)
>> From: shitao@ucla.edu
>>> 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)}
2003 Dec 11
0
Re: [R] chisq.test freezing on certain inputs (PR#5701)
On Thu, 11 Dec 2003, Jeffrey Chang wrote:
> Hello everybody,
>
> I'm running R 1.8.1 on both Linux and OS X compiled with gcc 3.2.2 and
> 3.3, respectively. The following call seems to freeze the interpreter
> on both systems:
> > chisq.test(matrix(c(233, 580104, 3776, 5786104), 2, 2),
> simulate.p.value=TRUE)
>
> By freeze, I mean, the function call never
2003 Dec 11
0
Re: [R] chisq.test freezing on certain inputs (PR#5701)
>>>>> "Torsten" == Torsten Hothorn <torsten@hothorn.de>
>>>>> on Thu, 11 Dec 2003 18:03:07 +0100 (CET) writes:
Torsten> On Thu, 11 Dec 2003, Jeffrey Chang wrote:
>> Hello everybody,
>>
>> I'm running R 1.8.1 on both Linux and OS X compiled with
>> gcc 3.2.2 and 3.3, respectively. The following
2003 Dec 13
0
chisq.test() and r2dtable() freezing on certain inputs (PR#5701)
>>>>> "MM" == Martin Maechler <maechler@stat.math.ethz.ch>
>>>>> on Thu, 11 Dec 2003 18:29:05 +0100 (CET) writes:
>>>>> "Torsten" == Torsten Hothorn <torsten@hothorn.de>
>>>>> on Thu, 11 Dec 2003 18:03:07 +0100 (CET) writes:
Torsten> On Thu, 11 Dec 2003, Jeffrey Chang wrote:
2013 Jul 09
0
probable bugs in stats::loglin calculation of pearson chisq
In running the following example of a loglinear model for the Titanic data,
I was surprised to see NaN reported for the
Pearson chisq
> loglin(Titanic, margin=list(1:3, 4))
2 iterations: deviation 2.273737e-13
$lrt
[1] 671.9622
$pearson
[1] NaN
$df
[1] 15
$margin
$margin[[1]]
[1] "Class" "Sex" "Age"
$margin[[2]]
[1] "Survived"
Tracing it back,
2017 Dec 28
0
Numerical stability in chisq.test
>>>>> 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 issues (PR#3486):
STATISTIC <- sum(sort((x - E) ^ 2 / E,
2018 Aug 21
1
bug report: inaccurate error message for stats::chisq.test
Hi,
`stats::chisq.test` checks that x and y each have at least 2 levels AFTER
filtering on complete cases.
It makes sense but the error message is misleading : ?'x' and 'y' must have
at least 2 levels?
Here?s how to reproduce the issue :
x <- structure(c(1L, 1L, 1L, 2L, 1L, 2L), .Label = c("0001", "0003"),
class = "factor")
y <-
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
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 =
2005 Aug 08
1
chisq.test
Hi
I am trying to use this function. Can anyone show me how I would input
the following example?
Chi-Squared = (40-30)^2 + (20-30)^2 + (30-30)^2
30 30 30
= 3.333 + 3.333 + 0 = 6.666 (p value = 0.036)
I want to be able to use different denominators so can you show me how I
can do it to accommodate these rather than assuming they are all the
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
2007 Jul 01
1
How to save results from chisq.test or mantelhaen.test to file
Hi,
I am new to these functions. I'm wondering if there is anyway to save the entire results (all attributes of the result object) from the chisq.test or mantelhaen.test functions? For example, from chisq.test function, you will have statistic, parameter, p.value, expected, etc. in the result list. How can I save all of them in one shot to, says, a text file or csv file? Thank you.
- adschai
2007 Nov 09
1
fisher.test, chisq.test
Hi,
I want to analyse a contigency table (3 x 12) with a fisher.test
beacause there are cells that are less than 5.
?mmen Anken Baf Belchen H?chi Hof Porti R?m Schmutz Sch?n Sissa Tann
class14 7 26 150 2 46 68 126 66 3 31 7 61
class24 7 6 55 5 49 71 93 90 1 18 16 79
class34 1 1 4 3 19 8 29 61
2007 Nov 15
0
Package to make stepwise model selection using F or Chisq test
Hi,
I looking for a method that use F or Chisq test instead of AIC in a stepwise
modelo selection.
I try the grasp package using the grasp.step.anova, but It dont work.
> library(grasp)
Carregando pacotes exigidos: gam
Carregando pacotes exigidos: splines
Carregando pacotes exigidos: mda
Carregando pacotes exigidos: class
> data(anorexia,package="MASS")
>
> m1 <-
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