Displaying 20 results from an estimated 1000 matches similar to: "inconsistency in pchisq (PR#7099)"
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]
2006 Dec 01
2
Non central chi squared bug (PR#9406)
Full_Name: Alan Bain
Version: 2.4.0
OS: XP
Submission from: (NULL) (155.140.122.227)
Code for pnchisq contains following
if (tSml) {
if (x> f+ theta+ 5*sqrt(2*(f+2*theta) ))){
return 1.; /* better than 0 --- but definately FIXME */
}
}
This needs to check which tail has been requested; it is only correct if the
default lower_tail=1 has been requested; for upper tail should return 0
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]]
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
2004 Jan 19
2
small bug on qchisq (PR#6442)
Full_Name: Drouilhet R?my
Version: 1.8.1
OS: Linux
Submission from: (NULL) (195.221.43.136)
qchisq(1,10) works well but qchisq(1,10,ncp=0) does not work whereas ncp=0 is
the default value of the function qchisq(1,10). (of course, 10 will be replaced
by any integer value).
Let us notice that this bug occurs only when applying probability one.
(qchisq(seq(0,.9,.1),10,ncp=0) works very well).
2006 Mar 02
1
calling R's library using C
Hi,
Thanks, everyone for all the help! So, here is my calling function in C
(called
test.c):
#include<stdio.h>
#include<stdlib.h>
#include<Rmath.h>
int main(void) {
printf("%f \n",pchisq(2.,7., 1, 0));
printf("%f \n",pnchisq(2.,7.,0., 1, 0));
return EXIT_SUCCESS;
}
I compile using:
gcc test.c -I/usr/lib/R/include
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
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
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 Jan 19
2
pchisq error
Dear R experts,
I'm trying to call 'pchisq' from within a C subroutine. The following
error is returned:
** NON-convergence in pgamma()'s pd_lower_cf() f= nan.
This error message is not printed the first time I call 'pchisq' from
the C subroutine, but the second time or the next time I call 'pchisq'
from within R.
My session output is shown below:
2008 Aug 21
1
pnmath compilation failure; dylib issue?
(1) ...need to speed up a monte-carlo sampling...any suggestions about
how I can get R to use all 8 cores of a mac pro would be most useful
and very appreciated...
(2) spent the last few hours trying to get pnmath to compile under os-
x 10.5.4...
using gcc version 4.2.1 (Apple Inc. build 5553) as downloaded from
CRAN, xcode 3.0...
...xcode 3.1 installed over top of above after
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
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
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)
1997 Jul 09
1
R-beta: Problem with `rpois'
There is a problem with `rpois'. It does seem to take care about the
order of the arguments. This is an example:
> rpois(n=1,lambda=2)
[1] 3
> rpois(lambda=2,n=1)
[1] 2 0
It obviously uses the first argument as the number of samples to be
drawn, which is wrong.
I used Version 0.49 Beta (April 23, 1997).
Fredrik
1997 Jul 09
1
R-beta: Problem with `rpois'
There is a problem with `rpois'. It does seem to take care about the
order of the arguments. This is an example:
> rpois(n=1,lambda=2)
[1] 3
> rpois(lambda=2,n=1)
[1] 2 0
It obviously uses the first argument as the number of samples to be
drawn, which is wrong.
I used Version 0.49 Beta (April 23, 1997).
Fredrik
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 Mar 03
1
Fwd: Re: calling R's library using C
Sorry, forgot to switch the header to the R group....
--- Globe Trotter <itsme_410 at yahoo.com> wrote:
> Date: Thu, 2 Mar 2006 19:35:21 -0800 (PST)
> From: Globe Trotter <itsme_410 at yahoo.com>
> Subject: Re: [R] calling R's library using C
> To: Dirk Eddelbuettel <edd at debian.org>
>
> Hi, Dirk:
>
> Thanks for all the help. I thought I would
2004 Sep 20
5
persiting complex R objects
Is there a method to save a large and complex R object (either as a
binary or text file) so that it can be loaded and reused at a later
time? Specifically, I am creating large lists (several thousand
elements), each element of which is either a vector or a matrix (with ~
2000 rows). The dimensions of the matrices are not all the same. My
ideal would be a set of functions of the form
obj
2010 Sep 27
2
max length of a factor variable
Hi
Is there a maximum length for the character string representing a level
of a factor? I have a set of several million variables, each a factor
of length 19. Each factor level is a character string which in some
cases can be many thousands of characters long. I am trying to find out
why my analysis fails - I just wanted to rule out the possibility that
the internal factor conversion has a