View source: R/mra-wendland-2d.R
mra_wendland_2d | R Documentation |
Code to construct the mutli-resolution sparse basis function representation for fitting spatial processes
mra_wendland_2d(
locs,
M = 4,
n_coarse_grid = 10,
n_padding = 5L,
n_neighbors = 68,
max_points = NULL,
basis_type = "wendland",
use_spam = TRUE
)
locs |
The location variables in 2 dimensions over which to construct the basis function representation |
M |
The number of resolutions. |
n_coarse_grid |
The number of basis functions in one direction (e.g. |
n_padding |
The number of additional boundary points to add on each boundary. For example, n_padding = 5 will add 5 boundary knots to the both the left and right side of the grid). |
n_neighbors |
The expected number of neighbors for each interior basis function. This determines the basis radius parameter. |
max_points |
The expected number of pairs less than or equal to the radius. Default is |
basis_type |
A string of which basis function type to use. Currently available basis function types are at |
use_spam |
is a boolean flag to determine whether the output is a list of |
A list of objects including the observation locations locs
,
the MRA knots locations locs_grid
,
the Wendland basis representation matrix W
at the observed locations,
the basis radius radius
,
the numbers of resolutions M
,
#' the basis function dimensions n_dims
,
the basis function resolution indices dims_idx
,
the number of expected neighbors in the interior of each grid n_neighbors
,
the number of interior basis functions in one direction n_coarse_grid
,
the number of additional padding basis functions given by n_padding
,
and the setting use_spam
which determines whether the MRA output uses the spam
format.
set.seed(111)
locs <- matrix(runif(20), 10, 2)
MRA <- mra_wendland_2d(locs, M = 2, n_coarse_grid = 4)
## plot the MRA grid at different resolutions
plot_MRA_grid(MRA)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.