Re: [R] numerical integration and 'non-finite function value' error

2011-06-24 Thread Adan_Seb
The domain of the beta distribution as defined in R is 0 <= x <= 1 and as shown by David Winsemius it is undefined outside [0,1]. But thats sort of the question I have. To elaborate, I have a variable with 0 as its natural lower limit but can assume any positive number as an upper limit. So its do

Re: [R] numerical integration and 'non-finite function value' error

2011-06-23 Thread David Winsemius
On Jun 23, 2011, at 8:55 AM, Adan_Seb wrote: Here is a self-contained example of my problem. set.seed(100) x = rbeta(100, 10.654, 10.439) # So the shape parameters and the exteremes are a = 10.654 b = 10.439 xmax = 1 xmin = 0 # Using the non-standardized form (as in my application and this s

Re: [R] numerical integration and 'non-finite function value' error

2011-06-23 Thread Adan_Seb
Here is a self-contained example of my problem. set.seed(100) x = rbeta(100, 10.654, 10.439) # So the shape parameters and the exteremes are a = 10.654 b = 10.439 xmax = 1 xmin = 0 # Using the non-standardized form (as in my application and this shouldn't make any difference) of the # Beta densi

Re: [R] numerical integration and 'non-finite function value' error

2011-06-22 Thread Ravi Varadhan
In the limit as x goes to infinity, the integrand x f(x) should go to 0 sufficiently fast in order for the integral to be finite. The error indicates that the integrand becomes infinite for large x. Check to ensure that the integrand is correctly specified. I don't understand how you can repla