[R] pchisq error

Bernardo Rangel Tura tura at centroin.com.br
Mon Jan 19 10:45:52 CET 2009


On Mon, 2009-01-19 at 09:54 +0100, Jeremy Silver wrote:
> Dear R experts,
(...)
> > pchisq(5.464342,1,lower.tail = FALSE)
> 
> [1] 0.01940836
> 
> > reproduceError(5.464342)
> 
> stat = 5.464342, p = 0.019408
> 
> > pchisq(5.464342,1,lower.tail = FALSE)
> 
> [1] NaN
> 
> Warning messages:
> 
> 1: In pchisq(5.464342, 1, lower.tail = FALSE) :
> 
>    ** NON-convergence in pgamma()'s pd_lower_cf() f= nan.
> 
> 2: In pchisq(q, df, lower.tail, log.p) : NaNs produced
> > 
(...)
> 
> > sessionInfo()
> 
> R version 2.8.0 (2008-10-20) 
> 
> i686-pc-linux-gnu 
> 
> locale:
> 
> LC_CTYPE=en_US.UTF-8;LC_NUMERIC=C;LC_TIME=en_US.UTF-8;LC_COLLATE=en_US.UTF-8;LC_MONETARY=C;LC_MESSAGES=en_US.UTF-8;LC_PAPER=en_US.UTF-8;LC_NAME=C;LC_ADDRESS=C;LC_TELEPHONE=C;LC_MEASUREMENT=en_US.UTF-8;LC_IDENTIFICATION=C
> 
> attached base packages:
> 
> [1] stats     graphics  grDevices utils     datasets  methods   base     

Hi Jeremy,

In my computer your error is not occur. Look This:

> pchisq(5.464342,1,lower.tail = FALSE)
[1] 0.01940836

> pchisq(5.464342,1,lower.tail = FALSE)
[1] 0.01940836

> sessionInfo()
R version 2.8.1 Patched (2009-01-16 r47630) 
x86_64-unknown-linux-gnu 

locale:
LC_CTYPE=en_US.UTF-8;LC_NUMERIC=C;LC_TIME=en_US.UTF-8;LC_COLLATE=en_US.UTF-8;LC_MONETARY=C;LC_MESSAGES=en_US.UTF-8;LC_PAPER=en_US.UTF-8;LC_NAME=C;LC_ADDRESS=C;LC_TELEPHONE=C;LC_MEASUREMENT=en_US.UTF-8;LC_IDENTIFICATION=C

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods
base     


Well, do you already try update your R?


-- 
Bernardo Rangel Tura, M.D,MPH,Ph.D
National Institute of Cardiology
Brazil




More information about the R-help mailing list