Description Usage Arguments Value Author(s) References Examples
This function is used to obtain quadrature points to approximate an integral
1 |
n |
number of quadrature points |
ndim |
number of integrals or dimension problem |
pruning |
a logical indicating whether you want pruning approach, by default is TRUE |
nodes |
nodes |
weights |
weights |
product |
product weights |
Freddy Hernandez Barajas
Hernandez, F., Usuga, O. and Giampaoli, V. (2014). Improving the Adaptive Gaussian Quadrature. Journal of Statistical Software, submitting.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | # Comparing the number of points in a two-dimensional case
require(GHQp)
par(mfrow=c(2,2))
plot(GHQ(15,2,FALSE)$nodes,pch=20,xlab='',ylab='',
main='Without pruning, n=15 and q=2')
plot(GHQ(15,2,TRUE)$nodes, pch=20,xlab='',ylab='',
main='With pruning, n=15 and q=2')
# Comparing the number of points in a three-dimensional case
require(scatterplot3d)
datos <- GHQ(15,3,FALSE)$nodes
scatterplot3d(datos, type="p", highlight.3d=TRUE,
angle=55, scale.y=0.7, pch=16,
main='Without pruning, n=15 and q=3',
cex.symbols=0.4,xlab='',ylab='',zlab='')
datos <- GHQ(15,3,TRUE)$nodes
scatterplot3d(datos, type="p", highlight.3d=TRUE,
angle=55, scale.y=0.7, pch=16,
main='With pruning, n=15 and q=3',
cex.symbols=0.4,xlab='',ylab='',zlab='')
|
Loading required package: statmod
Loading required package: scatterplot3d
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.