[R] "adaptIntegrate" function
Blaser Nello
nblaser at ispm.unibe.ch
Thu Mar 21 16:21:22 CET 2013
Under ?adaptIntegrate, you will find the link to http://ab-initio.mit.edu/wiki/index.php/Cubature#Infinite_intervals, where it says that "Integrals over infinite or semi-infinite intervals is possible by a change of variables."
-----Original Message-----
From: r-help-bounces at r-project.org [mailto:r-help-bounces at r-project.org] On Behalf Of li li
Sent: Donnerstag, 21. März 2013 16:10
To: r-help
Subject: [R] "adaptIntegrate" function
Hi all,
it seems that there is problem with function "adaptIntegrate", when the integration limits is infinity.
Please see the code below. The second integration does not seem to work.
Can anyone familiar with this give some help?
Thank you with much.
Hanna
library(mnormt)
library(cubature)
ff <- function(x, rho){
mu <- rep(0,3)
Sigma <-(1-rho)*diag(3)+matrix(rho,3,3)
f <- dmnorm(x, mu, Sigma)
f
} adaptIntegrate(ff, lower=c(-10, -10, -10), upper=c(3,2,1), rho=0.1, maxEval=10000)
adaptIntegrate(ff, lower=rep(-Inf, 3), upper=c(3,2,1), rho=0.1, maxEval=10000)
[[alternative HTML version deleted]]
______________________________________________
R-help at 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.
More information about the R-help
mailing list