Hi again,

I was tying to solve following 2-fold integration with package cubature.
However spending approximately 2 hours it failed to generate any number. I
am using latest R with win-7 machine having 4gb ram.

> library(cubature)
> f <- function(x) {
+ z1 <- x[1]
+ z2 <- x[2]
+
+ Rho = 1
+
+ L <- log(1 - pnorm(z1)) * log(1 - pnorm(Rho * z1 + sqrt(1 - Rho^2) * z2))
* dnorm(z1) * dnorm(z2)
+
+ return(L)
+ }; adaptIntegrate(f, lowerLimit = c(-Inf, -Inf), upperLimit = c(Inf, Inf))
Error in adaptIntegrate(f, lowerLimit = c(-Inf, -Inf), upperLimit = c(Inf,
 :
  'Realloc' could not re-allocate memory (1006632880 bytes)
In addition: Warning messages:
1: In adaptIntegrate(f, lowerLimit = c(-Inf, -Inf), upperLimit = c(Inf,  :
  Reached total allocation of 1535Mb: see help(memory.size)
2: In adaptIntegrate(f, lowerLimit = c(-Inf, -Inf), upperLimit = c(Inf,  :
  Reached total allocation of 1535Mb: see help(memory.size)


Would really appreciate if someone helps me to sort out this problem.

Thanks and regards,

        [[alternative HTML version deleted]]

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to