search for: qgamma

Displaying 20 results from an estimated 63 matches for "qgamma".

Did you mean: gamma
2008 Mar 24
1
Inaccurate qgamma() (PR#11030)
I haven't looked inside to see what is causing this, but there's a big discontinuity in qgamma: curve(qgamma(x, shape=19), from=1e-10, to=2e-10) This appears in both R-patched and R-devel. Duncan Murdoch
2008 Aug 07
1
qgamma inaccuracy (PR#12324)
Full_Name: Version: 2.7.1 (2008-06-23) OS: windows vista Submission from: (NULL) (216.82.144.137) Hello, I have been working with various probability distributions in R, and it seems the gamma distribution is inaccurate for some inputs. For example, qgamma(1e-100, 5e-101, lower.tail=FALSE) gives: 1.0. However, it seems this is incorrect; I think the correct answer should be 0.082372029620717283. When I check these numbers using pgamma, I get: pgamma(1,5e-101, lower.tail=FALSE) = 9.1969860292859463e-102 and pgamma(0.082372029620717283,5e-101, lower.t...
2008 Aug 05
0
qgamma inaccuracy
Hello, I have been working with various probability distributions in R, and it seems the gamma distribution is inaccurate for some inputs. For example, qgamma(1e-100, 5e-101, lower.tail=FALSE) gives: 1.0. However, it seems this is incorrect; I think the correct answer should be 0.082372029620717283. When I check these numbers using pgamma, I get: pgamma(1,5e-101, lower.tail=FALSE) = 9.1969860292859463e-102 and pgamma(0.082372029620717283,5e-101, lower.t...
2009 Sep 04
3
Applying qqmath using gamma distribution...
Hello ALL! Can anyone tell me how to specify qqmath() function with distribution qgamma? In help it is bit vague how to pass shape and scale parameters for gamma. Thank you in advance. Best, PM
2006 Jun 30
5
median of gamma distribution
Doese anyone know a R function to find the median of a gamma distribution? [[alternative HTML version deleted]]
2002 Oct 25
0
qgamma precision (PR#2214)
Full_Name: Morten Welinder Version: 1.5.1 OS: Solaris Submission from: (NULL) (65.213.85.136) I was having problems with qgamma's precision in the sense that pgamma(qpgamma(x)) was not as close to the identity function as I would like. I was seeing relative errors with random input of about 1e-8. This fits nicely with the code'd EPS2 value of 5e-7. To solve this I added a newton step at the end. This seems far c...
2009 Mar 24
0
Return value from a C program is different from the R console
Dear R-users, I'm trying to call the qgamma function from a C program. But I'm experiencing a strange issue: the value returned by the C function seems to be different from the value returned by a R console. I'm running on linux 2.6.27 (ubuntu), i686 arch; R version 2.7.1 (2008-06-23) (shipped by ubuntu). My C code: #include <s...
2009 Sep 17
2
QQ plotting of various distributions...
...n) etc. The best way would be via qq-plot, to show to students differences. First two are trivial: qqnorm(dat$X) qqnorm(log(dat$X)) Then, things are getting more "hairy". I am not sure how to make plots for the rest. I tried gamma with: qqmath(~ X, data=dat, distribution=function(X) qgamma(X, shape, scale)) Which should be the same as: plot(qgamma(ppoints(dat$X), shape, scale), sort(dat$X)) Shape and scale parameters I got via mhsmm package that has gammafit() for shape and scale parameters estimation. Am I on right track? Does anyone know how to plot the rest: ex-Gaussian (exponen...
2013 Jun 22
1
Superpose two QQ-plots (gamma distribution) with, lattice function qqmath()
...> x = rgamma(200,shape,rate) > groups = gl(2,100,200,labels=LETTERS[1:2]) > dat = data.frame(x=x, gp=groups) > > qqmath(~ x, data = dat, > groups = gp, > pch = 20, > type = c("p","g"), > distribution = function(x) qgamma(x,shape,rate), > panel = function(x,groups,...) { > panel.qqmath(x,groups, ...) > }) This works! Thank you very much (I had spent some time on that). I now try to add a QQ-line but face a new problem. Only one line appears, away from the points: qqma...
2001 Sep 06
1
RFC: d/p/q/rgamma
dgamma and friends in S are documented as dgamma(x, shape, rate=1) pgamma(q, shape, rate=1) qgamma(p, shape, rate=1) rgamma(n, shape, rate=1) whereas R has dgamma(x, shape, scale=1, log = FALSE) pgamma(q, shape, scale=1, lower.tail = TRUE, log.p = FALSE) qgamma(p, shape, scale=1, lower.tail = TRUE, log.p = FALSE) rgamma(n, shape, scale=1) Note the use of rate vs scale. Indeed, as both S and...
2009 Nov 02
1
need help in using Hessian matrix
...is error Error in f1 - f2 : non-numeric argument to binary operator the data is given by U<-runif(n) Us<-sort(U) tau1<- 2 F1tau<- pgamma((tau1/theta1),shape,1) N1<-sum(Us<F1tau) X1<- Us[1:N1] Ti<- theta1*qgamma(Us[1:N1],shape,1) w=N1+1 V<- Us[w:r] N2<- length(V) V1<-theta2*qgamma(V,shape,1) Tj<-V1+tau1-(theta2/theta1)*tau1 c1<-matrix(Ti,ncol=1) c2<-matrix(Tj,ncol=1) cc<-data.frame(rbind(c1,c2))[,1] requir...
2008 Feb 19
2
Confidence Interval for SMR
Hello, I am looking for a function which allows to calculate the confidence interval for a standard mortality ratio. I do have vectors with the number of observed and expected death. Has anybody a hint where to look? Best, Stefan
2007 May 31
1
Problems when linking to R shared library
...d::cout << pgamma(1.5, 2.0, 3.0, 1, 0) << std::endl; Outputs 1, expect 0.090204 std::cout << ppois(2.0, 5.0, 1, 0) << std::endl; Outputs 0, expect 0.124652 std::cout << qchisq(0.5, 2.0, 1, 0) << std::endl; Outputs -0.61379, expect 1.38629 std::cout << qgamma(0.5, 2.0, 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...
2008 Jul 26
4
parametric bootstrap
Hi I am trying to find a parametric bootstrap confidence interval and when I used the boot function I get zero bias and zero st.error? What could be my mistake? Thank you and take care. Laila [[alternative HTML version deleted]]
2008 Aug 21
1
pnmath compilation failure; dylib issue?
...o lbeta.o lgamma.o lgammacor.o mlutils.o pbeta.o pbinom.o pcauchy.o pchisq.o pexp.o pf.o pgamma.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...
2004 Mar 10
1
accuracy of chi-square distribution approximations
Hi there, How accurate is the aproximation R makes to the Chi-Square distribution? For example, if I run: > qchisq(1/1000000,6) [1] 0.03650857 how accurate is 0.0365 compared to the theoretical percentile? What kind of approximations have been made in the software's algorithm? It woudl be useful to know since I am working with tiny percentiles such as one one-millionth and one
2005 May 23
1
transform normally distributed random terms to gamma distributed random terms
Hi, I have normally distributed random terms u~N(0,1). I want to get gamma distributed random terms g~(scale,shape) with E(g)=1=shape/scale and var(g)=theta=1/scale=1/shape. How can I reach my goal? The following way doesn't work: use the distribution function of u to get U(0,1)- distributed random terms, then take the quantile function of the gamma distribution with shape and scale. The
2009 Dec 14
0
R 2.10.1 is released
...) function gave an error in the reporting function and so was not reported properly. o Text help rendering did not handle very long input lines properly. o promptMethods() generated signature documentation improperly. o pgamma(x, a, lower.tail=FALSE) and qgamma(..) are now considerably more accurate in some regions for very small 'a'. qgamma() now correctly returns 0 instead of NaN in similar extreme cases, and qgamma() no longer warns in the case of small 'a', see (PR#12324). o unname() now also remo...
2009 Dec 14
0
R 2.10.1 is released
...) function gave an error in the reporting function and so was not reported properly. o Text help rendering did not handle very long input lines properly. o promptMethods() generated signature documentation improperly. o pgamma(x, a, lower.tail=FALSE) and qgamma(..) are now considerably more accurate in some regions for very small 'a'. qgamma() now correctly returns 0 instead of NaN in similar extreme cases, and qgamma() no longer warns in the case of small 'a', see (PR#12324). o unname() now also remo...
1999 Aug 03
2
compliation problem
...-OPT:IEEE_NaN_inf=ON -I../include -I../../src/include -c S_compat.c -o S_compat.o cc-1143 cc: ERROR File = ../include/Mathlib.h, Line = 329 Declaration is incompatible with "long double gammal(long double)" (declared at line 819 of "/usr/include/math.h"). double qgamma(double, double, double); ^ 1 error detected in the compilation of "S_compat.c". make[2]: *** [S_compat.o] Error 2 make[2]: Leaving directory `/usr/people/faculty/math/mgass/stage/R/R-0.64.2/src/appl' make[1]: *** [R] Error 1 make[1]: Leaving directory `/usr/people/faculty/ma...