search for: gammafn

Displaying 15 results from an estimated 15 matches for "gammafn".

2005 Jun 14
3
Calling C from Fortran
I would like to call C routines from Fortran under linux as suggested in section 5.6 of the "Writing R extensions" documentation. I'm familiar with Fortran but not with C. I understand the example provided in Fortran: subroutine testit() double precision normrnd, x call rndstart() x = normrnd() call dblepr("X was", 5, x, 1) call rndend() end but I don't understand
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.
2008 Oct 23
1
distribution fitting
...(minuslog = nll_gamma_log, start = list(lambda_log = 0, alfa_log=0)) There were 50 or more warnings (use warnings() to see the first 50) of course I got many "value out of range" warnings: > warnings() Warning messages: 1: In log(gamma(exp(log_alfa))) ... : value out of range in 'gammafn' [...] 7: In gamma(exp(log_alfa)) ... : NaNs produced [...] 50: In log(gamma(exp(log_alfa))) ... : value out of range in 'gammafn' but that was expected, right? The real problems come out when I try to fit a General Pareto distribution. Using the same method, I calculated the negative...
2008 Feb 15
0
Poisson-lognormal probability calculations
...alues over 170, and I need to go to *much* bigger numbers. It fails first because of gamma overflow, then because of non-finite integrand. --------------------- > VGAM::dpolono(170) [1] 4.808781e-09 > VGAM::dpolono(171) [1] 0 Warning message: In VGAM::dpolono(171) : value out of range in 'gammafn' > VGAM::dpolono(172) [1] 0 Warning message: In VGAM::dpolono(172) : value out of range in 'gammafn' > VGAM::dpolono(173) [1] 0 Warning message: In VGAM::dpolono(173) : value out of range in 'gammafn' > VGAM::dpolono(174) Error in integrate(f = integrand, lower = -Inf,...
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
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]]
2008 Feb 15
0
Behaviour of integrate (was 'Poisson-lognormal probability calcul ations')
...h* bigger numbers. It fails first because > of gamma overflow, then because of non-finite integrand. > --------------------- > > VGAM::dpolono(170) > [1] 4.808781e-09 > > VGAM::dpolono(171) > [1] 0 > Warning message: > In VGAM::dpolono(171) : value out of range in 'gammafn' > > VGAM::dpolono(172) > [1] 0 > Warning message: > In VGAM::dpolono(172) : value out of range in 'gammafn' > > VGAM::dpolono(173) > [1] 0 > Warning message: > In VGAM::dpolono(173) : value out of range in 'gammafn' > > VGAM::dpolono(174) &gt...
2008 Feb 18
0
Solved (??) Behaviour of integrate (was 'Poisson-lognormal probab ility calculations')
...e > > of gamma overflow, then because of non-finite integrand. > > --------------------- > > > VGAM::dpolono(170) > > [1] 4.808781e-09 > > > VGAM::dpolono(171) > > [1] 0 > > Warning message: > > In VGAM::dpolono(171) : value out of range in 'gammafn' > > > VGAM::dpolono(172) > > [1] 0 > > Warning message: > > In VGAM::dpolono(172) : value out of range in 'gammafn' > > > VGAM::dpolono(173) > > [1] 0 > > Warning message: > > In VGAM::dpolono(173) : value out of range in 'gamma...
2009 Jul 01
2
Difficulty in calculating MLE through NLM
...ed other set of starting values, but then also I am getting final parameter estimates similar to starting values and iteration stops just after one step. When I check for warnings, R displays following kind of warnings: * NA/Inf replaced by maximum positive value * value out of range in 'gammafn' Please suggest what I should do. I am expecting the final MLE of alpha1, alpha2, beta1 and beta2 greater than 0 and P should lie between 0 to 1. Thanks & Regards, Madan Gopal Kundu Biostatistician, CDM, MACR, Ranbaxy Labs. Ltd. Tel(O): +91 (0) 1245194045 - Mobile: +91 (0) 9868788406 (...
2008 Sep 05
2
using nls to fit a curve to data
...alpha)^(k-1))*exp(-c*(degdays-alpha)), start=list(A=30,k=2,c=.018,alpha=131)) I get the error message: Error in numericDeriv(form[[3]], names(ind), env) : Missing value or an infinity produced when evaluating the model In addition: Warning message: full precision was not achieved in 'gammafn' My starting values yield a curve very similar t to other models which I fitted successfully. So any suggestions? I've tried different starting values. -- View this message in context: http://www.nabble.com/using-nls-to-fit-a-curve-to-data-tp19332210p19332210.html Sent from the R hel...
2009 Feb 24
0
samr-package: problem with large sample size multiclass data
...mr-package to identify significantly differentially expressed genes in microarray data. So far, I had no problems, but when I used a large multiclass data set with 327 samples, I obtained the following error/warning message: Warning message: Inf In factorial(length(y)) : value out of range in 'gammafn' Since y is the label vector and has length 327, the factorial is indeed a very large number. Am I doing something wrong or is the samr-package just not appropriate for large sample size data sets? Though I only obtain a warning message and no error message, the output of the algorithm is obvi...
2006 Dec 08
1
MAXIMIZATION WITH CONSTRAINTS
...em with different values of ?n?. BUT I have encountered 2 problems: 1) the result of the maximization is the same of the minimization, i.e. the maximum value of the function is equal to the minimum (TOO OFTEN) 2) a lot of times the algorithm returns errors such as ?value out of range in 'gammafn'? In both cases 1) 2) I don?t know where is the problem, which is my mistake. Can you help me?! Do you know another way to solve my problem of maximization under constraints? THANKS! My R instructions n=c(10,20,3,5) n1=n[1] n2=n [2] n3=n[3] n4=n[4] logfr=function(x) { ##function to max...
2011 Feb 01
6
help
PLEASE HELP I actually want to do the following: a[j] = (1/(j!))*Π (i-1-d), j = 500, Π means product i = 1 to j   Yet, j! will stop at 170 and Π (i-1-d) at 172; so, a[j] will not exceed 170. I would like to have at least 200 a[j].   WHAT SHOULD I DO?   PLEASE SEE MY CODE FOR DETAIL!! #################################################### R CODE:
2008 Jan 27
2
Likelihood optimization numerically
Dear List, I am not sure how should i optimize a log-likelihood numerically: Here is a Text book example from Statistical Inference by George Casella, 2nd Edition Casella and Berger, Roger L. Berger (2002, pp. 355, ex. 7.4 # 7.2.b): data = x = c(20.0, 23.9, 20.9, 23.8, 25.0, 24.0, 21.7, 23.8, 22.8, 23.1, 23.1, 23.5, 23.0, 23.0) n <- length(x) # likelihood from a 2 parameter Gamma(alpha,
1999 Aug 03
2
compliation problem
Problem compiling R. version: 0.64.2 machine: SGI O2 OS: IRIX6.5 CC cc FC f77 MAKE GNU make 3.75 Here is part of the the output for make. make[2]: Leaving directory `/usr/people/faculty/math/mgass/stage/R/R-0.64.2/src/include' make[2]: Entering directory `/usr/people/faculty/math/mgass/stage/R/R-0.64.2/src/appl' cc -g -OPT:IEEE_NaN_inf=ON -I../include