Given a specific geometry and the initial information supplied in an LKinfo list create the information that is needed to define the lattice for a given model. This function is required for any new geometry added to LatticeKrig.
LKrigSetupLattice(object, ...)
# S3 method for default
LKrigSetupLattice(object, ...)# S3 method for LKBox
LKrigSetupLattice(object, verbose,...)
LKBoxCreateLattice(LKinfo, verbose = FALSE)
# S3 method for LKRectangle
LKrigSetupLattice(object, verbose,...)
LKRectangleCreateLattice(LKinfo, verbose = FALSE)
# S3 method for LKInterval
LKrigSetupLattice(object, verbose,...)
LKIntervalCreateLattice(LKinfo, verbose = FALSE)
# S3 method for LKRing
LKrigSetupLattice(object, verbose,...)
# S3 method for LKCylinder
LKrigSetupLattice(object, verbose,...)
# S3 method for LKSphere
LKrigSetupLattice(object, x = NULL, verbose,...)
For the LKInterval, LKRectangle, LKBox
geometries.
A list with required components:
The total number of lattice points. i.e. the total number of basis functions.
A matrix giving the number of lattice points in each coordinate (columns) and at each level (rows) of the multi-resolution.
When the lattice points are unrolled as a single array, a vector of indexes giving the start of each lattice level in the coefficient vector.
A vector of the lattice point spacings for each level.
Limits of spatial domain.
A vector giving number of lattice points at each level.
In addition, the methods for Cartesian and cartesian-like spatial domains ( LKInterval, LKRectangle, LKBox, LKRing, LKCylinder, LKSphere) include the additional components:
A matrix giving number of grid points at each level and for each dimension.
Same as mLevel but restricted to lattice points within the spatial domain.
Same as mx but restricted to the points within the spatial domain.
Passed value.
Passed value.
A list where each component is also list giving the grid points of the lattice in each coordinate.
LKSphere also returns the additional component grid3d
-- the direction Cosines
of the grid points.
The LKinfo object created by LatticeKrig
or by
LKrigSetup
.
A list that is an LKinfo object.
If TRUE print out intermediate information for debugging.
Locations of the observations that define spatial domain. For LKSphere locations are in lon/lat degrees.
Any additional arguments.
Doug Nychka
This method takes the LKInfo object and the other arguments and computes the
lattice information needed for a specific geometry. Three lower
level functions that actually create the lattices for regular grids in 1D, 2D, and 3D
were written to make the code eaiser to follow and hanlde both the case when the number of basis functions is specified (NC
) or where the grid spacing is specified (delta
).
These functions are
called from within LKrigSetup and the results are added as a component tolatticeInfo
as part of the LKinfo object. The way
to design what should be in latticeInfo
is to keep in mind that
creating the spatial AR matrix (LKrigSAR) and determining the multi-resolution
lattice points (LKrigLatticeCenters) use the information in the LKinfo
object.
Because the lattice must depend on the geometry the default method just prints out an error message.
NC and NC.buffer
for Cartesian geometries (e.g. LKInterval, LKRectangle, LKBox,
LKRing
) are parameters to specify to number of the
grid points in the largest dimension of the spatial domain and for the
coarsest lattice. These should already be a component in the LKinfo object,
object specified in the usage.
For LKInterval
this is just of lattice points at the coarsest level.
For LKRectangle and LKBox if the spatial domain has the same size in all
dimensions then the number of lattice points within the spatial domain are
NC^2 and NC^3 respectively. Note that the total number of lattice points
at a given level is also effected the size of NC.buffer (see below).
The number of lattice points to add to the margins beyond the
spatial domain is controlled by NC.buffer
. Thus in the largest spatial dimension there are a total of
NC + NC.buffer*2 grid points. This is the number of lattice points for
LKInterval.
LatticeKrig
LKGeometry
LKrigSetup
,
LKrigSAR
,
LKrigLatticeCenters