rescale.NIGrid: moves, rescales and/or rotates a multidimensional grid.

View source: R/mvQuad.R

rescale (rescale.NIGrid)R Documentation

moves, rescales and/or rotates a multidimensional grid.

Description

rescale.NIGrid manipulates a grid for more efficient numerical integration with respect to a given domain (bounded integral) or vector of means and covariance matrix (unbounded integral).

Usage

rescale(object, ...)

## S3 method for class 'NIGrid'
rescale(object, domain = NULL, m = NULL, C = NULL,
  dec.type = 0, ...)

Arguments

object

an initial grid of type NIGrid

...

further arguments passed to or from other methods

domain

a (d x 2)-matrix with the boundaries for each dimension

m

vector of means

C

covariance matrix

dec.type

type of covariance decomposition (Peter Jaeckel (2005))

Value

This function modifies the "support-attribute" of the grid. The recalculation of the nodes and weights is done when the getNodes or getWeights are used.

References

Peter Jaeckel (2005): A note on multivariate Gauss-Hermite quadrature

See Also

quadrature, createNIGrid

Examples

C = matrix(c(2,0.9,0.9,2),2)
m = c(-.5, .3)
par(mfrow=c(3,1))

myGrid <- createNIGrid(dim=2, type="GHe", level=5)

rescale(myGrid, m=m, C=C, dec.type=0)
plot(myGrid, col="red")

rescale(myGrid, m=m, C=C, dec.type=1)
plot(myGrid, col="green")

rescale(myGrid, m=m, C=C, dec.type=2)
plot(myGrid, col="blue")

mvQuad documentation built on Sept. 19, 2023, 5:06 p.m.