similar to: gamma and lgamma functions (PR#684)

Displaying 20 results from an estimated 8000 matches similar to: "gamma and lgamma functions (PR#684)"

2009 Apr 22
2
integrate lgamma from 0 to Inf
Dear R users, i try to integrate lgamma from 0 to Inf. But here i get the message "roundoff error is detected in the extrapolation table", if i use 1.0e120 instead of Inf the computation works, but this is against the suggestion of integrates help information to use Inf explicitly. Using stirlings approximation doesnt bring the solution too. ## Stirlings approximation lgammaApprox
2002 Dec 22
1
lgamma(-0.8)=?
Dear R users: I wonder anyone is aware of such a thing from lgamma() > lgamma(-0.8) [1] 1.747207 I thought it should be NA as in S-PLUS. Both R-1.3.1 and R-1.5.1 report this result. I don't have the latest R-1.6.1 so I don't know whether this is corrected or not. Happy holidays, Paul.
1998 Sep 10
2
R-beta: trouble compiling 0.62.3 on SunOS 4.1.4: lgamma conflicts
I've recently tried to get 0.62.3 up on our Suns (4.1.4, using gcc; I'm also having trouble with a Solaris 2.6 compile but I haven't given up hope on that one yet) -- the last compile I did was 0.61.1, which worked smoothly. Running ./configure --prefix=/usr/local/apps/R/R-0.62.3 [--with-g77] (tried both with and without g77, eventually get to the same place), I get a conflict
2009 Nov 20
1
Bessel function with large index value
I am looking for a method of dealing with the modified Bessel function K_\nu(x) for large \nu. The besselK function implementation of this allows for dealing with large values of x by allowing for exponential scaling, but there is no facility for dealing with large \nu. What would work for me would be an lbesselK function in the manner of lgamma which returned the log of K_\nu(x) for large
2009 Jul 15
1
GLM Gamma Family logLik formula?
Hello all, I was wondering if someone can enlighten me as to the difference between the logLik in R vis-a-vis Stata for a GLM model with the gamma family. Stata calculates the loglikelihood of the model as (in R notation) some equivalent function of -1/scale * sum(Y/mu+log(mu)+(scale-1)*log(Y)+log(scale)+scale*lgamma(1/scale)) where scale (or dispersion) = 1, Y = the response variable, and mu
2011 Nov 18
3
Permutations
Hi all, why factorial(150) shows the error out of range in 'gammafn'? I have to calculate the number of subset formed by 150 samples taking 10 at a time. How is this possible? best [[alternative HTML version deleted]]
2014 Sep 22
2
Replace isnan and lgamma in Fortran subroutine in R package
Hello, I submitted a package which used Fortran functions isnan and lgamma. However, I was told that: isnan and lgamma are not Fortran 95 functions. I was asked to write 'cross-platform portable code' and so should not be writing GNU extensions to Fortran. See http://cran.r-project.org/web/checks/check_results_mpath.html, which will shortly show installation failures under Solaris. I
2011 Feb 09
3
precision of gamma function
Dear R users, I have to calculate gamma functions for negative numbers beyond -171.4. e.x. gamma(-500.4) I got following: > gamma(-170.4) [1] -5.824625e-308 > gamma(-171.4) [1] 0 Warning message: underflow occurred in 'gammafn' I have tried to use a recursion getting values a little futher -180. How could I solve this problem? Thank you beforehand. Chuse.
2005 Dec 05
3
The gamma function and infinity
I have to calculate some formula like: gamma(x)/(gamma(x+y) and I observed that for relatively big values of x, R returns infinity and so cannot compute the formula. Is it possible to force R to give the real value of gamma(x) instead of Inf ? thanks
2008 Apr 18
3
help me to debug this part of code?
I am trying to solve the integration equation, for different values of K from 4 to 25, the integration is with respect to u, Here is the equation: gamma(k/2) / ( sqrt(k-1)*gamma((k-1)/2) ) * integrate(f= (1+u^2/k-1)^(-k/2), lower=0, upper= sqrt(a^2*k/(k+1-a^2)) ) = the similar expression as te left hand except k becomes k+1 my code is below, I don't know why R keep telling me the syntax
2004 Jun 26
1
S4 group "Math", "getGroupMembers", "genericForPrimitive"
Hi, I found the following on Windows 2000/NT R Version 1.9.1 (2004-06-21) (also Version 1.9.0): The S4 group "Math" doesn't work as documented; i.e., "log", "log10", "gamma" and "lgamma" are included in the documentation but don't work. See example code below. Moreover, what about 'genericForPrimitive' which is used in
2009 Oct 24
2
Implementation of gamma function for large number
Hi - I ran into a problem when the argument to gamma function is large. Says, if I do the following: > gamma(17000) [1] Inf Warning message: value out of range in 'gammafn' Is there anyway to get around this or other implementation? Thank you. -rc
2009 Dec 15
3
RFC: lchoose() vs lfactorial() etc
lgamma(x) and lfactorial(x) are defined to return ln|Gamma(x)| {= log(abs(gamma(x)))} or ln|Gamma(x+1)| respectively. Unfortunately, we haven't chosen the analogous definition for lchoose(). So, currently > lchoose(1/2, 1:10) [1] -0.6931472 -2.0794415 NaN -3.2425924 NaN -3.8869494 [7] NaN -4.3357508 NaN -4.6805913 Warning message: In
2007 Oct 14
1
Extending deriv3()
Hello, I was wondering if the functions deriv3(), deriv() etc. could be extended to handle psigamma() and its special cases (digamma(), trigamma() etc.). From the error message it seems that 'psigamma' needs to be added to the derivatives table. This might be easy since psigamma() has a deriv argument. Additionally, this error message is also obtained when requesting for the Hessian of
2001 Dec 04
3
factorial() not here (PR#1194)
Version 1.3.1 (2001-08-31) factorial() is not in R. It is in S-Plus with the definition factorial <- function(n) gamma(n + 1) -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-devel mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not
1998 Aug 14
1
R-beta: ld problem/SunOS/gcc/g77
In trying to compile R-0.62.2 on my SPARC SunOS: tajo% uname -a SunOS tajo 4.1.3_U1 1 sun4m with gcc/g77, I ran into gcc -o R.binary [deleted] ../lib/libmath.a -L/usr/openwin/lib -lX11 -ldl -ltermcap -lm -lf2c collect2: ld returned 2 exit status ld: /lib/libm.a(lgamma.o): _gamma: multiply defined ld: /lib/libm.a(lgamma.o): _lgamma: multiply defined *** Error code 1 make: Fatal error:
2007 Aug 30
2
Incomplete Gamma function
Hello I am trying to evaluate an Incomplete gamma function in R. Library Zipfr gives the Igamma function. From Mathematica, I have: "Gamma[a, z] is the incomplete gamma function." In[16]: Gamma[9,11.1] Out[16]: 9000.5 Trying the same in R, I get > Igamma(9,11.1) [1] 31319.5 OR > Igamma(11.1,9) [1] 1300998 I know I have to understand the theory and the math behind it rather
2007 Oct 26
5
help
hello, please can anyone help me out. Am a new user of R program. Am having problem with this code below, not getting the expected results. 1. Each m, the cumulative sum should be 1.000 but the 2nd and 3rd m returned 2.000 and 3.000 instead of 1.000. 2. to get the LCL(m) and UCL(m) for each m base on these instructions if out.cum > 0.025 then LCL(m)= y-1 if out.cum >0.975
2007 Oct 29
2
help please
hello, please can anyone help me out. Am a new user of R program. Am having problem with this code below, not getting the expected results. Each m, the cumulative sum should be 1.000 but the 2nd and 3rd m returned 2.000 and 3.000 instead of 1.000. thanks Aruike pp=function(x,n,M){z=1.0;a=2.3071430;b=7.266064;H=3 out.h=c() out.y=c() out.m=c() out.prob=c()
2011 Aug 17
1
multinomRob - error message
Hi, I would like to use the multinomRob function to test election results. However, depending on which independent variables I include and how many categories I have in the dependent variable, the model cannot be estimated. My data look like this (there are 68 observations): > head(database) RESTE09 GAUCHE09 PDC09 PLR09 UDC09 MCG09 RESTE05 GAUCHE05 PDC05 D1 1455