Displaying 20 results from an estimated 4000 matches similar to: "how to calculate chisq value in R"
2008 Jan 07
2
chi-squared with zero df (PR#10551)
Full_Name: Jerry W. Lewis
Version: 2.6.1
OS: Windows XP Professional
Submission from: (NULL) (24.147.191.250)
pchisq(0,0,ncp=lambda) returns 0 instead of exp(-lambda/2)
pchisq(x,0,ncp=lambda) returns NaN instead of exp(-lambda/2)*(1 +
SUM_{r=0}^infty ((lambda/2)^r / r!) pchisq(x, df + 2r))
qchisq(.7,0,ncp=1) returns 1.712252 instead of 0.701297103
qchisq(exp(-1/2),0,ncp=1) returns 1.238938
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,
2006 Jan 17
1
how can i locate the source code of a module quickly?
I have dowloaded the Source Code of R,and I want to know the process of
chi-sqared test,but how can I found it?
[[alternative HTML version deleted]]
2001 Dec 09
1
Help for Power analysis
Dear colleague,
I not sure this R code is correctly ? I would to show
the number of Sample Size at Sample Size Axis that line
draw from Power Axis (80%) from R code.
How I show this and select the most appropriate of
this power (.79955687 - 80983575).
Thank for your help and answer.
Best Regards,
Nikom Thanomsieng,
Email: nikom at kku.ac.th
....
#Power analysis: Sample size for
2004 Jul 16
2
inconsistency in pchisq (PR#7099)
Full_Name: Richard Mott
Version: 1.9.0
OS: Windows XP
Submission from: (NULL) (81.178.233.208)
Shouldn't these give the same answer?
> pchisq(67.60644,df=1,lower.tail=F,ncp=0)
[1] 3.219647e-15
> pchisq(67.60644,df=1,lower.tail=F)
[1] 1.996145e-16
>
2008 Aug 10
1
(Un-)intentional change in drop1() "Chisq" behaviour?
Dear List,
recently tried to reproduce the results of some custom model selection
function after updating R, which unfortunately failed. However, I
ultimately found the issue to be that testing with pchisq() in drop1()
seems to have changed. In the below example, earlier versions (e.g. R
2.4.1) produce a missing P-value for the variable x, while newer
versions (e.g. R 2.7.1) produce 0 (2.2e-16).
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 332.9 8 < 2.2e-16 ***
---
Signif.
2007 Oct 10
5
chi2
Hello,
I want to use the quantile function so I read the doc but I don't understand with this
> qchisq(seq(0.05,0.95,by=0.05),df=(length(don)-1))
[1] 62667.11 62795.62 62882.42 62951.47 63010.74 63064.00 63113.39 63160.27 63205.65 63250.33 63295.04 63340.48 63387.48 63437.03 63490.53 63550.14 63619.68
[18] 63707.24 63837.16
Can you help me please?
2005 Jun 15
1
Chi square convolution?
Hi,
I want to determine the confidence interval on the sum of two sigma's.
Is there an easy way to do this in R? I guess I have to use some sort of
chisquare convolution algorithm???
Thanx,
Roy
--
The information contained in this communication and any atta...{{dropped}}
2003 Apr 13
2
Peculiarity in non-central qchisq for ncp > 294.92 ...
Hello all,
Here's my query:
Running R 1.6.2 on FreeBSD 5.0, and on WinXP, and I find that the
following hangs the process:
dchisq(alpha=0.01, df=1, ncp=295)
but it does work for ncp < 294.92.
Is this general?
Best wishes to all,
Andrew
Andrew Robinson Ph: 208 885 7115
Department of Forest Resources Fa: 208 885 6226
University of Idaho E : andrewr at uidaho.edu
PO
2007 Jan 31
2
Bug in 'pchisq' for x=0.0 (PR#9485)
The function 'pchisq' from the 'stats' library gives a wrong result if the
argument equals exactly zero:
# Upper tail of central 1-df chi^2 distribution
> pchisq(1 , 1, ncp=0, lower.tail = F, log.p = FALSE)
[1] 0.3173105
> pchisq(0.5 , 1, ncp=0, lower.tail = F, log.p = FALSE)
[1] 0.4795001
> pchisq(0.01 , 1, ncp=0, lower.tail = F, log.p = FALSE)
[1]
2003 Feb 14
1
FW: [Fwd: Re: [S] Exact p-values]
Dear all
Just for fun, I have just downloaded the paper mentioned below and checked
it with R-1.6.1.
Everything is ok with exception of Table 2b, where I get always 1 instead of
0.5:
> pbinom(1e15,2e15,0.5)
[1] 1
Which value should be correct?
Best regards
Christian Stratowa
==============================================
Christian Stratowa, PhD
Boehringer Ingelheim Austria
Dept NCE Lead
2007 Apr 17
3
Extracting approximate Wald test (Chisq) from coxph(..frailty)
Dear List,
How do I extract the approximate Wald test for the
frailty (in the following example 17.89 value)?
What about the P-values, other Chisq, DF, se(coef) and
se2? How can they be extracted?
######################################################>
kfitm1
Call:
coxph(formula = Surv(time, status) ~ age + sex +
disease + frailty(id,
dist = "gauss"), data = kidney)
2004 Aug 19
1
precision problems in testing with Intel compilers
I compiled the 1.9.1 src.rpm with the standard gnu tools and it works.
I tried compiling the 1.9.1 src.rpm with the Intel 8 C and FORTRAN
compilers and it bombs out during the testing phase:
comparing 'd-p-q-r-tests.Rout' to './d-p-q-r-tests.Rout.save' ...267c267
< df = 0.5[1] "Mean relative difference: 5.001647e-10"
---
> df = 0.5[1] TRUE
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),
2002 Nov 15
1
anova.glm gets test="Chisq" wrong (PR#2294)
Full_Name: Robert King
Version: 1.5.0
OS: windows
Submission from: (NULL) (134.148.4.19)
Also occurs in 1.6.0 on linux
anova.glm(fitted.object,test="Chisq") is giving strange answers in this
situation
> resptime
sex task time
1 m s 210
2 m s 300
3 m s 420
4 f s 250
5 f s 310
6 f s 390
7 m c 310
8 m c 400
9 m c 600
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
2009 Oct 11
2
Accuracy (PR#13999)
Full_Name: Viktor Witkovsky
Version: 2.9.2
OS: Windows XP
Submission from: (NULL) (78.98.89.227)
Hello,
I have found strange behavior of the function qchisq (the non-central qchisq is
based on inversion of pchisq, which is further based on pgamma). The function
gives wrong results without any warning. For example:
qchisq(1e-12,1,8.94^2,lower.tail=FALSE) gives 255.1840972465858 (notice that
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
2002 Oct 17
3
Non-central distributions
Hi Folks,
I note that, while the "chisq" functions
dchisq(x, df, ncp=0, log = FALSE)
pchisq(q, df, ncp=0, lower.tail = TRUE, log.p = FALSE)
qchisq(p, df, ncp=0, lower.tail = TRUE, log.p = FALSE)
rchisq(n, df, ncp=0)
all have a slot for the non-centrality parameter "ncp", of
the functions for the t and F distributions:
dt(x, df, log = FALSE)