Learn R Programming

mvQuad (version 1.0-8)

rescale (rescale.NIGrid): 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 NIGrid rescale(object, domain = NULL, m = NULL, C = NULL, dec.type = 0, ...)

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.

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))

References

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

See Also

quadrature, createNIGrid

Examples

Run this code
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")

Run the code above in your browser using DataLab