mvQuad-package | R Documentation |
This package provides methods to construct multivariate grids, which can be used for multivariate quadrature. This grids can be based on different quadrature rules like Newton-Cotes formulas (trapezoidal-, Simpson-rule, ...) or Gauss-Quadrature (Gauss-Hermite, Gauss-Legendre, ...). For the construction of the multidimensional grid the product-rule or the combination-technique can be applied.
Package: | mvQuad |
Type: | Package |
Version: | 1.0-8 |
Date: | 2023-09-18 |
License: | GPL-3 |
Constantin Weiser (University Mainz / Germany) Maintainer: Constantin Weiser <constantin.weiser@gmail.com>
Philip J. Davis, Philip Rabinowitz (1984): Methods of Numerical Integration
F. Heiss, V. Winschel (2008): Likelihood approximation by numerical integration on sparse grids, Journal of Econometrics
H.-J. Bungartz, M. Griebel (2004): Sparse grids, Acta Numerica
Peter Jaeckel (2005): A note on multivariate Gauss-Hermite quadrature
myGrid <- createNIGrid(dim=2, type="GLe", level=5)
rescale(myGrid, domain=rbind(c(-1,1),c(-1,1)))
print(myGrid)
plot(myGrid, col="blue")
myFun <- function(x){
1 - x[,1]^2 * x[,2]^2
}
quadrature(myFun, myGrid)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.