search for: qpois

Displaying 20 results from an estimated 50 matches for "qpois".

Did you mean: rpois
2009 Mar 08
1
typo in qpois help (PR#13583)
Full_Name: Manikandan Narayanan Version: 2.8.1 OS: Linux Submission from: (NULL) (155.91.45.231) Here is an excerpt from qpois help page (?qpois): The quantile is left continuous: 'qgeom(q, prob)' is the largest integer x such that P(X <= x) < q. I think the "qgeom" here should be "qpois" instead. Please correct this typo in ?qpois, since it's misleading in its current f...
2005 Aug 09
0
qpois minor bug (PR#8058)
Full_Name: Mikael Weigelt Version: 2.0 OS: windows Submission from: (NULL) (207.171.180.101) The calculation of the qpois attempts to use the Cornish-Fisher expansion as a starting approximation. The definition of the expansion is incorrect. However, since this approximation just gives an initial solution, the end result of the function is still correct. To fix the approximation, in the snippet below the line...
1998 Mar 25
1
R-beta: qpois help
version .62: --------------------------------------------- > ?qpois The Poisson Distribution dpois(x, lambda) ppois(q, lambda) qpois(p, lambda) rpois(n, lambda) Arguments: x: vector of (positive) quantiles. p: vector of probabilities. n: number of random values to return. lambda: vector...
2010 Jan 29
1
qpois Help problems (PR#14200)
Full_Name: Jerry W. Lewis Version: 2.10.1 OS: Windows XP Professional Submission from: (NULL) (198.180.131.21) In the line "The quantile is right continuous: qpois(q, lambda) is the smallest integer x such that P(X <= x) >= q." "q" is used as a probability when the Arguments section defines it to be a quantile. Also there are some representation problems where the escape character is printed instead of interpreted, such as "\ldots&...
2009 Jan 15
1
Confidence Intervals for Poisson
...th(x))) UpperCI<-mean(x)+(qnorm(1-alpha[n]/2, mean = 0, sd = 1)*sqrt(var(x)/length(x))) cat("For Alpha=",alpha[n],"LowerCI=",LowerCI,"<","Lambda=",mean(x),"<","UpperCI=",UpperCI,"\n") } When I do something like: qpois(.975, 12.73, lower.tail = TRUE, log.p = FALSE) [1] 20 > qpois(.025, 12.73, lower.tail = TRUE, log.p = FALSE) [1] 6 I get quite a different result. Is this the difference between the normal approx and an (almost) exact Poisson CI? Thx! [[alternative HTML version deleted]]
2007 May 31
1
Problems when linking to R shared library
..., 3.0, 1, 0) << std::endl; Outputs 0.0282703, expect 5.03504 I should stress that within the R environment, I *do* get the values I expect: though sometimes the arguments need adjusting as the C functions have slightly different argument lists from the R versions. Also: std::cout << qpois(0.5, 5.0, 1, 0) << std::endl; Seems to go into an infinite loop inside qpois, while: qbeta(0.1, 1e-5, 1e-5, 1, 0); Raises an access violation inside R: although I should stress that all other beta quantiles I've tested come out OK. Anyway, hopefully you can just tell me what an idiot...
2017 Aug 07
0
Latin hypercube sampling from a non-uniform distribution
...s the observed distribution? One simple way is to use the uniform random output of randomLHS as input to the quantile function for your desired distribution(s). For example: q <- randomLHS(1000, 3) colnames(q) <- c("A", "B", "mort") q[, "mort"] <- qpois(q[,"mort"], 1.5) S Ellison ******************************************************************* This email and any attachments are confidential. Any use, copying or disclosure other than by the intended recipient is unauthorised. If you have received this message in error, please...
2017 Aug 04
2
Latin hypercube sampling from a non-uniform distribution
Hello, I am performing a sensitivity analysis using a Latin Hypercube sampling. However, I have difficulty to draw a Hypercube sample for one variable. I?ve generated this variable from a Poisson distribution as follows: set.seed(5) mortality_probability <- round(ppois(seq(0, 7, by = 1), lambda = 0.9), 2) barplot(mortality_probability, names.arg = seq(0, 7, by = 1), xlab = "Age
2017 Aug 07
2
Latin hypercube sampling from a non-uniform distribution
Thanks for your answer. However, my variable is simulated from the cumulative distribution function of the Poisson distribution. So, the pattern obtained from the function "qpois" is not the same as the observed pattern (i.e., obtained from the function "ppois") set.seed(5) mortality_probability <- round(ppois(seq(0, 7, by = 1), lambda = 0.9), 2) barplot(mortality_probability, names.arg = seq(0, 7, by = 1), xlab = "Age class", ylab = "Proba...
2008 Aug 21
1
pnmath compilation failure; dylib issue?
....o pgeom.o phyper.o plnorm.o plogis.o pnbeta.o pnbinom.o pnchisq.o pnf.o pnmath.o pnorm.o pnt.o polygamma.o ppois.o pt.o ptukey.o punif.o pweibull.o qbeta.o qbinom.o qcauchy.o qchisq.o qexp.o qf.o qgamma.o qgeom.o qhyper.o qlnorm.o qlogis.o qnbeta.o qnbinom.o qnchisq.o qnf.o qnorm.o qnt.o qpois.o qt.o qtukey.o qunif.o qweibull.o sign.o stirlerr.o toms708.o -lgomp -F/Library/Frameworks/R.framework/.. - framework R -Wl,-framework -Wl,CoreFoundation ld: warning, duplicate dylib /Developer/SDKs/MacOSX10.4u.sdk/usr/local/ lib/libgcc_s.1.dylib ** arch - ppc ... gcc -arch ppc -isysroot /Dev...
2007 Jan 09
2
Logical operations or selecting data from data.frames
Hi all, why doesn't something like this does not work? speedy <- (sdata$VaR < sdata$DdtdAbs) && sdata$DdtdDuration >= qpois(pct,lambda) && sdata$Ddtd > MinDD or sdata$Ddtd[sdata$Ddtd > 0 && sdata$VaR < sdata$DdtdAbs] sdata looks like this: dataId date value Ddtd VaR DdtdAbs DdtdDuration 18948 79637 2004-07-27 10085.10 NA NA 0.00 0 18949 796...
2009 May 20
3
qbinom (PR#13711)
Full_Name: Wolfgang Resch Version: R 2.8.1 GUI 1.27 OS: OS X 10.4.11 Submission from: (NULL) (137.187.89.14) Strange behavior of qbinom: > qbinom(0.01, 5016279, 1e-07) [1] 0 > qbinom(0.01, 5016279, 2e-07) [1] 16 > qbinom(0.01, 5016279, 3e-07) [1] 16 > qbinom(0.01, 5016279, 4e-07) [1] 16 > qbinom(0.01, 5016279, 5e-07) [1] 0
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
2004 Jan 09
4
Poisson distribution help requested
Could somebody help me to understand the syntax of R's ppois function? I'm looking to calculate the cumulative probability density of an observed value (y) given the expected mean (mu) and the level of significance (alpha). I'm coming from using SAS to do this and don't recognize the descriptions of the arguments for ppois. The definitions of lambda and p as stated in the R manuals
2004 Jan 15
1
Exactness of ppois
...onvolution algorithm, we found the following "inexactness": We work with R Version 1.8.1 (2003-11-21) on Windows systems (NT, 2000, XP). Try the code: ## Kolmogorov distance between two methods to ## determine P(Poisson(lambda)<=x) Kolm.dist <- function(lam, eps){ x <- seq(0,qpois(1-eps, lambda=lam), by=1) max(abs(ppois(x, lambda=lam)-cumsum(dpois(x, lambda=lam)))) } erg<-optimize(Kolm.dist, lower=900, upper=1000, maximum=TRUE, eps=1e-15) erg Kolm1.dist <- function(lam, eps){ x <- seq(0,qpois(1-eps, lambda=lam), by=1) which.max(abs(ppois(x, lambda=lam)-cumsum...
2009 Mar 17
3
R does not compile any more on FreeBSD 8.0-CURRENT
...o rt.o dnt.o dchisq.o pchisq.o qchisq.o rchisq.o rnchisq.o dbinom.o pbinom.o qbinom.o rbinom.o rmultinom.o dcauchy.o pcauchy.o qcauchy.o rcauchy.o dexp.o pexp.o qexp.o rexp.o dgeom.o pgeom.o qgeom.o rgeom.o dhyper.o phyper.o qhyper.o rhyper.o dnbinom.o pnbinom.o qnbinom.o rnbinom.o dpois.o ppois.o qpois.o rpois.o dweibull.o pweibull.o qweibull.o rweibull.o dlogis.o plogis.o qlogis.o rlogis.o dnchisq.o pnchisq.o qnchisq.o dnbeta.o pnbeta.o qnbeta.o pnf.o pnt.o qnf.o qnt.o ptukey.o qtukey.o toms708.o wilcox.o signrank.o ranlib libnmath.a config.status: creating src/unix/Makefile make: /usr/local/...
1999 Apr 09
7
Error in ppois function (PR#161)
Full_Name: Murray H Smith Version: 0.63.3 OS: Windows NT Submission from: (NULL) (130.216.5.57) The ppois function is displaced by -0.5. Try: > ppois(-0.5,1) [1] 0.3678794 > ppois(-0.51,1) [1] 0 > ppois(0,1) [1] 0.3678794 and > par(mfrow=c(2,1)) > x<-seq(-1,5,0.01) > plot(x,ppois(x,1),type="s",ylab="F(x)",main="Poisson CDF?") >
2010 Jun 13
1
Simulating a Poisson Process in R by calling C Code over .Call
Hi I want to write a C function for the R Code below and call it with .Call: SimPoisson <- function(lambda,tgrid,T2M) #Simulation eines Poissonprozesses { NT <- 0 Ni <- rep(0,length(tgrid)) tau <- 0 sign <- 0 if(lambda != 0) { i=1 j=1 while (1) { EVar <- rexp(1,lambda) sign <- sign + EVar if (sign > T2M) { break } tau[i] <- sign
2005 Apr 30
1
User-defined random variable
Dear All I would like to know whether it is possible with R to define a discrete random variable different from the ones already defined inside R and generate random numbers from that user-defined distribution. Thanks in advance, Paul