Re: [R] integrate lgamma from 0 to Inf

2009-04-27 Thread JLucke
Street Buffalo, NY 14203-1016 Office: 716-887-6807 Fax: 716-887-2510 http://www.ria.buffalo.edu/profiles/lucke.html Andreas Wittmann andreas_wittm...@gmx.de Sent by: r-help-boun...@r-project.org 04/22/2009 03:28 AM To r-help@r-project.org cc Subject [R] integrate lgamma from 0 to Inf

Re: [R] integrate lgamma from 0 to Inf

2009-04-27 Thread Stavros Macrakis
On Wed, Apr 22, 2009 at 3:28 AM, Andreas Wittmann andreas_wittm...@gmx.de wrote: i try to integrate lgamma from 0 to Inf. Both gamma and log are positive and monotonically increasing for large arguments. What can you conclude about the integrability of log(gamma(x))? -s

Re: [R] integrate lgamma from 0 to Inf

2009-04-27 Thread JLucke
14203-1016 Office: 716-887-6807 Fax: 716-887-2510 http://www.ria.buffalo.edu/profiles/lucke.html Stavros Macrakis macra...@alum.mit.edu Sent by: r-help-boun...@r-project.org 04/27/2009 10:30 AM To Andreas Wittmann andreas_wittm...@gmx.de cc r-help@r-project.org Subject Re: [R] integrate

[R] integrate lgamma from 0 to Inf

2009-04-22 Thread Andreas Wittmann
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

Re: [R] Integrate function

2008-12-22 Thread David Winsemius
If these messages you're hearing are warnings, then the answer might be: ?warnings -- David Winsemius On Dec 22, 2008, at 6:07 PM, glenn roberts wrote: Quick One if any one can help please. On use of integration function ‘integrate’; how do I get the function to return just the value

Re: [R] Integrate function

2008-12-22 Thread David Winsemius
.. but it turned out he wanted; integrate(integrand)$value -- David Winsemius On Dec 22, 2008, at 6:26 PM, David Winsemius wrote: If these messages you're hearing are warnings, then the answer might be: ?warnings -- David Winsemius On Dec 22, 2008, at 6:07 PM, glenn roberts wrote:

[R] integrate problem

2008-10-15 Thread Wade Winterhalter
i'm in the process of switch from Maple to R and am trying to code the following function: w(d)=\int -Inf_Inf A(x) |int 0_(t(d)-x) Fy dydx can some one point me in the right direction? i don't seem to be able to figure it out on my own. Dr. Wade Winterhalter University of Central Florida

[R] integrate: can pass numbers but not variables as additional arguments

2008-09-30 Thread Sasha Pustota
I'm trying to integrate one dimension of a bivariate normal. It works when additional parameters are passed explicitly: library(mvtnorm) bivInt - function(x,y,mx,my,r) { dmvnorm(c(x, y), mean=c(mx, my), sigma=rbind(c(1, r), c(r, 1))) } integrate(Vectorize(bivInt), lower=-Inf, upper=2, 1, 2, 2,

Re: [R] Integrate a 1-variable function with 1 parameter (Jose L.Romero)

2008-08-28 Thread Ravi Varadhan
; [EMAIL PROTECTED] Subject: Re: [R] Integrate a 1-variable function with 1 parameter (Jose L.Romero) This can be done analytically: after changing a variable (2*t - t) and some scaling we need to compute f(x) = integral from 0 to 20 of (t^x*exp(-t))dt/factorial(x) f(0) = int from 0 to 20 of exp(-t)dt

[R] Integrate a 1-variable function with 1 parameter (Jose L. Romero)

2008-08-27 Thread jose romero
Hey fellas: I would like to integrate the following function: integrand - function (x,t) { exp(-2*t)*(2*t)^x/(10*factorial(x)) } with respect to the t variable, from 0 to 10. The variable x here works as a parameter: I would like to integrate the said function for each value of x in

Re: [R] Integrate a 1-variable function with 1 parameter (Jose L. Romero)

2008-08-27 Thread Peter Dalgaard
jose romero wrote: Hey fellas: I would like to integrate the following function: integrand - function (x,t) { exp(-2*t)*(2*t)^x/(10*factorial(x)) } with respect to the t variable, from 0 to 10. The variable x here works as a parameter: I would like to integrate the said function

Re: [R] Integrate a 1-variable function with 1 parameter (Jose L. Romero)

2008-08-27 Thread Ravi Varadhan
Subject: [R] Integrate a 1-variable function with 1 parameter (Jose L. Romero) Hey fellas: I would like to integrate the following function: integrand - function (x,t) { exp(-2*t)*(2*t)^x/(10*factorial(x)) } with respect to the t variable, from 0 to 10. The variable x here works as a parameter

Re: [R] Integrate a 1-variable function with 1 parameter (Jose L. Romero)

2008-08-27 Thread Peter Dalgaard
Peter Dalgaard wrote: jose romero wrote: Hey fellas: I would like to integrate the following function: integrand - function (x,t) { exp(-2*t)*(2*t)^x/(10*factorial(x)) } with respect to the t variable, from 0 to 10. The variable x here works as a parameter: I would like to

Re: [R] Integrate a 1-variable function with 1 parameter (Jose L. Romero)

2008-08-27 Thread jose romero
PROTECTED] Subject: RE: [R] Integrate a 1-variable function with 1 parameter (Jose L. Romero) To: [EMAIL PROTECTED], r-help@r-project.org Date: Wednesday, August 27, 2008, 2:42 PM Here is one way: integrand - function (t, x) { exp(-2*t)*(2*t)^x/(10*factorial(x)) } x - 0:44 ans

Re: [R] Integrate a 1-variable function with 1 parameter (Jose L. Romero)

2008-08-27 Thread Moshe Olshansky
/factorial(x) + f(x-1) so that f(x) = 1 - exp(-20)*sum(20^k/factorial(k)) where the sum is for k=0,1,...,x If I did not a mistake, your original quantity should be f(x)/20. --- On Thu, 28/8/08, jose romero [EMAIL PROTECTED] wrote: From: jose romero [EMAIL PROTECTED] Subject: [R] Integrate a 1

<    1   2