inla.spde.make.A.RdConstructs observation/prediction weight matrices for models based on
inla.mesh() and inla.mesh.1d() objects.
For a more modular approach, see fmesher::fm_basis(),
fmesher::fm_row_kron(), fmesher::fm_block(), and the inlabru
bru_mapper() system.
inla.spde.make.A(
mesh = NULL,
loc = NULL,
index = NULL,
group = NULL,
repl = 1L,
n.spde = NULL,
n.group = NULL,
n.repl = NULL,
group.mesh = NULL,
weights = NULL,
A.loc = NULL,
A.group = NULL,
group.index = NULL,
block = NULL,
n.block = NULL,
block.rescale = c("none", "count", "weights", "sum"),
...
)An inla.mesh() or inla.mesh.1d() object
specifying a function basis on a mesh domain. Alternatively, an
inla.spde object that includes a mesh (e.g. from
inla.spde2.matern()).
Observation/prediction coordinates. mesh and loc
defines a matrix A.loc of mapping weights between basis function
weights and field values. If loc is NULL, A.loc is
defined as Diagonal(n.spde, 1).
For each observation/prediction value, an index into
loc. Default is seq_len(nrow(A.loc)).
For each observation/prediction value, an index into the group model.
For each observation/prediction value, the replicate index.
The number of basis functions in the mesh model. (Note: may be different than the number of mesh vertices/nodes/knots.)
The size of the group model.
The total number of replicates.
An optional inla.mesh.1d() object for the
group model.
Optional scaling weights to be applied row-wise to the resulting matrix.
Optional precomputed observation/prediction matrix.
A.loc can be specified instead of mesh+loc, optionally
with index supplied.
Optional precomputed observation/prediction matrix for the
group model. A.group can be specified instead of group and/or
group.mesh, optionally with group.index supplied.
For each observation/prediction value, an index into the
rows of A.group.
Optional indices specifying block groupings: Entries with the
same block value are joined into a single row in the resulting
matrix, and the block values are the row indices. This is intended
for construction of approximate integration schemes for regional data
problems. See inla.spde.make.block.A() for details.
The number of blocks.
Specifies what scaling method should be used when
joining entries as grouped by a block specification. See
inla.spde.make.block.A() for details.
Additional parameters. Currently unused.
loc <- matrix(runif(10000 * 2) * 1000, 10000, 2)
mesh <- inla.mesh.2d(
loc = loc,
cutoff = 50,
max.edge = c(50, 500)
)
A <- inla.spde.make.A(mesh, loc = loc)