Displaying 20 results from an estimated 900 matches similar to: "integrate lgamma from 0 to Inf"
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
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
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.
2000 Oct 04
2
gamma and lgamma functions (PR#684)
The following seems very strange:
> lgamma(-0.04)
[1] 3.243307
> gamma(-0.04)
[1] -25.61830
Jim
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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 the subject !) To:
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
2006 Jul 22
1
ifelse command
Dear:
I try to revise the maximum likelihood function below using something constrains. But it seems something wrong with it. Becasue R would not allow me to edit the function like this. It is very appreciate if you can help.
function (parameters,y,x1,x2)
{
p<-parameters[1]
alpha1<-parameters[2]
beta1<-parameters[3)]
delta1<-parameters[4]
alpha2<-parameters[5]
2005 Jul 03
2
over/under flow
I am porting some FORTRAN to R in which an Inf triggers an if(). The
trigger is infinite on exp(lgamma(OVER)). What is the canonical R
style of determining OVER when exp(OVER)== Inf? The code structure
that I am
porting is best left intact--so I need to query R somehow to the value
of OVER that causes exp(lgamma(OVER)) to equal Inf.
On my system,
exp(lgamma(171)) is about first to equal Inf.
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
2011 May 09
1
Stirlings Approximation
I have some big combinations like:
4444444444444444444444444444 choose 784645433
Can R compute these?
Is there any package that does stirlings approximation in R?
--
Thanks,
Jim.
[[alternative HTML version deleted]]
2006 Jul 22
1
Why the contrain does not work for selecting a particular range of data?
Dear:
Continuing the issue of 'ifelse'! I selecting the data whose 'x2'=1 for maximizing likelihood. I used two way to do this but the results are different.
1.Way one I use the data for x2=1 and run the program. It works for me. Tthe program is described as below:
function (parameters,y1,x11)
{
p<-parameters[1]
alpha1<-parameters[2]
beta1<-parameters[3]
2003 Jan 22
1
negative multinomial regression models
Hello,
I''ve spent a lot of time during the past month trying to get negative
multinomial regression models for clustered event counts as described in
(Guang Guo. 1996. "Negative Multinomial Regression Models For Clustered
Event Counts." Sociological Methodology 26: 113-132., abstract at
http://depts.washington.edu/socmeth2/4abst96.htm) implemented in R. A
FORTRAN version of the
2011 Aug 02
1
My R code is not efficient
Dear R users,
I have two n*1 integer vectors, y1 and y2, where n is very very large.
I'd like to compute
elbp = 4^(y1) * 5^(y2) * sum_{i=0}^{max(y1, y2)} [{ (y1-i)! * (i)! *
(y2-i)! }^(-1)];
that is, I need to compute "elbp" for each (y1, y2) pair.
So I made R code like below, but I don't think it's efficient
Would you plz tell me how to avoid this "for"
2008 Sep 10
1
Computation of contour values - Speeding up computation
Dear R useRs,
i have the following code to compute values needed for a contour plot
############################################################
"myContour" <- function(a, b, plist, veca, vecb, dim)
{
tmpb <- seq(0.5 * b, 1.5 * b, length=dim)
tmpa <- seq(0.5 * a, 1.5 * a, length=dim)
z <- matrix(0, nrow=dim, ncol=dim)
for(i in 1:dim)
{
for(j in 1:dim)
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:
2004 Mar 24
1
Question on deriv3()
Hello:
Why is deriv3() functioning differently in R from that in Splus
using library(MASS) ? For example
deriv3(~(t1*log(t2)+lgamma(t1)+(1-t1)*log(y)+y/t2),c("t1","t2"),function(y,t1,t2)NULL)
complains of lgamma.
Mervyn
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
2006 Nov 15
1
OPTIM--non finite finite different [13]
Dear All:
I used optim() to minimise the loglikelihood function for fitting data to negative binomial distribution. But there initial value of log-likelihood and iteration 10 value are reasonable. for example:
initial value 1451657.994524
iter 10 value 47297.534905
iter 20 value -623478636.8236478
Then the iter 20 vlaue suddelnly changes to a negative value and in the end the error mesage is