Skip to content
Prev 308547 / 398506 Next

Error in integrate(integrand, 0, Inf) : non-finite function value

On 21-10-2012, at 05:01, stats12 wrote:

            
When I run this code (in TextMate 1.5; Mac OS X 10.6.8)  I get:

Error in integrate(integrand, 0, Inf) : non-finite function value
RMate stopped at line 0
Calls: nlm -> <Anonymous> -> f -> integrate
In addition: Warning messages:
1: In log(gamma(1 + 1/p)) : NaNs produced
2: In log(gamma(1 + 1/p)) : NaNs produced
Execution halted

In addition: why return(integ) in the inner loop with s? This implies an immediate return in function ll.

You initialize integ as a vector. But in the inner s loop you assign a scalar to integ.
The whole thing looks very muddled.

Your code should be indented for clarity.

Berend