similar to: Re: [R-SIG-Mac] Bug running pbinom() in R-GUI?

Displaying 20 results from an estimated 1000 matches similar to: "Re: [R-SIG-Mac] Bug running pbinom() in R-GUI?"

2005 Feb 23
1
Re: [R-SIG-Mac] Bug running pbinom() in R-GUI?
The real problem is that pbeta can take forever. That's bug #7153 and a fix is within reach. Morten
2006 Mar 22
4
pbinom( ) function (PR#8700)
Full_Name: Chanseok Park Version: R 2.2.1 OS: RedHat EL4 Submission from: (NULL) (130.127.112.89) pbinom(any negative value, size, prob) should be zero. But I got the following results. I mean, if a negative value is close to zero, then pbinom() calculate pbinom(0, size, prob). dbinom() also behaves similarly. > pbinom( -2.220446e-22, 3,.1) [1] 0.729 > pbinom( -2.220446e-8, 3,.1)
2012 Aug 20
1
The difference between chisq.test binom.test and pbinom
Hello all, I am trying to understand the different results I am getting from the following 3 commands: chisq.test(c(62,50), p = c(0.512,1-0.512), correct = F) # p-value = 0.3788 binom.test(x=62,n=112, p= 0.512) # p-value = 0.3961 2*(1-pbinom(62,112, .512)) # p-value = 0.329 Well, the binom.test was supposed to be "exact" and give the same results as the pbinom, while the chisq.test
2016 Oct 26
3
BUG?: On Linux setTimeLimit() fails to propagate timeout error when it occurs (works on Windows)
Thank you for the feedback and confirmations. Interesting to see that it's also reproducible on macOS expect for Spencer; that might indicate a difference in builds. BTW, my original post suggested that timeout error was for sure detected while running Sys.sleep(10). However, it could of course also be that it is only detected after it finishes. For troubleshooting, the
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
2016 Oct 27
2
BUG?: On Linux setTimeLimit() fails to propagate timeout error when it occurs (works on Windows)
On unix, unless event polling is enabled Sys.sleep just waits in a select() call (with a SIGINT handler in place) so the elapsed time isn't checked until after the select call is complete. Rstudio uses event polling, and in particular sets R_wait_usec to 10000, which means event and interrupt checks happen during a Sys.seep call. The R GUI on macOS doesn't seem to do this (but my lldb
2006 Feb 03
5
pbinom with size argument 0 (PR#8560)
Full_Name: Uffe H?gsbro Thygesen Version: 2.2.0 OS: linux Submission from: (NULL) (130.226.135.250) Hello all. pbinom(q=0,size=0,prob=0.5) returns the value NaN. I had expected the result 1. In fact any value for q seems to give an NaN. Note that dbinom(x=0,size=0,prob=0.5) returns the value 1. Cheers, Uffe
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
1998 Jun 30
0
R-beta: Re: [S] pbinom
Btw, all the pbinom() examples posted to S-news today return the proper result in R Martin >>>>> "JS" == James Stapleton <stapleton at stt.msu.edu> writes to S-news : JS> More interesting behavior of pbinom: >> pbinom(3,2,.8) JS> [1] 1 >> pbinom(30,2,.8) JS> [1] 0.9967653 >> pbinom(40,2,.8) JS> [1]
2002 May 17
0
pbinom gotcha (PR#1569)
This came up due to a question from Anders Hald: Bernoulli calculated an approximation to the smallest n so that P(0.58 <= x/n <= 0.62) >= 1000/1001 What is the exact value? Now try n <- 6350:6500 Pr <- function(n)pbinom(0.62*n,n,0.6) - pbinom(0.58*n,n,0.6) + dbinom(0.58*n,n,0.6) plot(n,Pr(n),type="b") abline(h=1000/1001) min(n[Pr(n)>1000/1001]) Next, try Pr
2010 Jun 15
2
GUI's and R background processes
Hello, I am new to R and have created an application using R 2.10, with a graphical UI using TclTk 8.5, running on windows 7, quad core machine. The intention of the application is to launch calculations and display results on a graphical dashboard. I've reached a roadblock, and I need to confirm that the following CANNOT be done. I've been trying to find a mechanism for doing the
2016 Oct 31
1
BUG?: On Linux setTimeLimit() fails to propagate timeout error when it occurs (works on Windows)
On Mon, 31 Oct 2016, Henrik Bengtsson wrote: > Thank you for looking into this Luke. > > On Thu, Oct 27, 2016 at 9:26 AM, <luke-tierney at uiowa.edu> wrote: >> On unix, unless event polling is enabled Sys.sleep just waits in a >> select() call (with a SIGINT handler in place) so the elapsed time >> isn't checked until after the select call is complete.
2011 Apr 25
3
Interrupting C++ code execution
Hello, I am writing an R interface for one of my C++ programs. The computations in C++ are very time consuming (several hours), so the user needs to be able to interrupt them. Currently, the only way I found to do so is calling R_CheckUserInterrupt() frequently. Unfortunately, there are several problems with that: 1. Calling R_CheckUserInterrupt() interrupts immediately, so I have no
2008 Aug 05
1
optimize simultaneously two binomials inequalities using nlm( ) or optim( )
Dear R users, I?m trying to optimize simultaneously two binomials inequalities (used in acceptance sampling) which are nonlinear solution, so there is no simple direct solution. Please, let me explain shortly the the problem and the question as following. The objective is to obtain the smallest value of 'n' (sample size) satisfying both inequalities: (1-alpha) <= pbinom(c, n, p1)
2009 Apr 14
1
R console freezes after several runs of compiled C code
Hi All, I tried my best to figure out how to deal with the freezing R console but with no luck. I followed the instructions of calling R_ProcessEvents() regularly but still couldn't work it out (the callings were removed from the below C code). I am using R-2.8.1 on Windows XP service pack 3. The Rtools is version 2.9. I have the following C code: void rx(int *n, int *m, int *rxmax,int
2009 Mar 17
3
R does not compile any more on FreeBSD 8.0-CURRENT
On a recent FreeBSD 8.0-CURRENT (i386) building R (any version) breaks with the following messages: ---------------------------------------------------------------------- [...snip...] gcc -std=gnu99 -I. -I../../src/include -I../../src/include -I/usr/local/include -DHAVE_CONFIG_H -g -O2 -c wilcox.c -o wilcox.o gcc -std=gnu99 -I. -I../../src/include -I../../src/include -I/usr/local/include
2010 Sep 28
1
checking user interrupts in C(++) code
Hello, My problem is that I have an extension in C++ that can be quite time-consuming. I'd like to make it interruptible. The problem is that if I use the recommended R_CheckUserInterrupt() method I have no possibility to cleanup (e.g. free the memory). I've seen an old thread about this, but I wonder if there's a new and definitive answer. I just do not understand why a simple
2000 Apr 07
4
Bug in qbinom? (PR#511)
n_10;p_0.5;jjx_0:n;qbinom(pbinom(jjx,n,p),n,p) # This one works as expected n_100;p_0.5;jjx_0:n;qbinom(pbinom(jjx,n,p),n,p) # This one causes severe problems I cannot interrupt using ESC and I finally have to resort to the Windows Task manager to kill the R session. A friend of mine told me that he faced similar problems under Unix. --please do not edit the information below-- Version:
2010 Mar 13
1
What can I use instead of ks.test for the binomial distribution ?
Hello all, A friend just showed me how ks.test fails to work with pbinom for small "size". Example: x<-rbinom(10000,10,0.5) x2<-rbinom(10000,10,0.5) ks.test(x,pbinom,10,0.5) ks.test(x,pbinom,size = 10, prob= 0.5) ks.test(x,x2) The tests gives significant p values, while the x did come from binom with size = 10 prob = 0.5. What test should I use instead ? Thanks, Tal