Description Usage Arguments Details Value
Calculates optimal collocation points from (sample) moments of the approximating distribution using the Golub-Welsch algorithm
1 | optimal_points(N, moment_fun = NULL, sample = NULL)
|
N |
The number of collocation points to calculate |
moment_fun |
A function which takes one (unsigned) integer k and return the k-th moment of the distribution to use for collocation. Only 2*N moments are needed. |
sample |
If moment_fun not specified, the sample from which to calculate the collocation points using the 2*N sample moments. |
Note: Using sample moments for a large sample from the approximating random variable gives similar results as using theoretical. For example, using sample = rnorm(1e6) gives similar points as using moment_fun = scmc::normal_moment_fun.
The N optimal collocation points for interpolation used in SCMC.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.