Does anybody know a rapid method for two dimensional integration in R?
library(adapt)
?adapt
is painfully slow.
Example:
I need something that can (numerically) integrate this function (it's a 2d isotropic version of the weibull):
fx=function(x,y,k=c(2000,20))
{(1/(2*pi)) * (k[2]/(k[1]^k[2])) * sqrt(x^2+y^2)^(k[2]-2) *
exp(-(sqrt(x^2+y^2)/k[1])^k[2])}
I don’t need an analytic solution as only the example I give will be simple enough for that... and not the actual models I work with (which is not the above).
Anybody have a way of rapid 2d numerical integration?
Thanks,
library(adapt)
?adapt
is painfully slow.
Example:
I need something that can (numerically) integrate this function (it's a 2d isotropic version of the weibull):
fx=function(x,y,k=c(2000,20))
{(1/(2*pi)) * (k[2]/(k[1]^k[2])) * sqrt(x^2+y^2)^(k[2]-2) *
exp(-(sqrt(x^2+y^2)/k[1])^k[2])}
I don’t need an analytic solution as only the example I give will be simple enough for that... and not the actual models I work with (which is not the above).
Anybody have a way of rapid 2d numerical integration?
Thanks,