inla.spde.make.A {INLA} | R Documentation

## Observation/prediction matrices for mesh models.

### Description

Constructs observation/prediction weight matrices for models based on `inla.mesh` and `inla.mesh.1d` objects.

### Usage

    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"),
                     ...)

### Arguments

`mesh` | 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`).
`loc` | 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)`.
`index` | For each observation/prediction value, an index into `loc`. Default is `seq_len(nrow(A.loc))`.
`group` | For each observation/prediction value, an index into the group model.
`repl` | For each observation/prediction value, the replicate index.
`n.spde` | The number of basis functions in the mesh model. (Note: may be different than the number of mesh vertices/nodes/knots.)
`n.group` | The size of the group model.
`n.repl` | The total number of replicates.
`group.mesh` | An optional `inla.mesh.1d` object for the group model.
`weights` | Optional scaling weights to be applied row-wise to the resulting matrix.
`A.loc` | Optional precomputed observation/prediction matrix. `A.loc` can be specified instead of `mesh`+`loc`, optionally with `index` supplied.
`A.group` | 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.
`group.index` | For each observation/prediction value, an index into the rows of `A.group`.
`block` | 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.
`n.block` | The number of blocks.
`block.rescale` | 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.

### Author(s)

Finn Lindgren finn.lindgren@gmail.com

### See Also

`inla.spde.make.index`

### Examples

    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)

[Package INLA version 18.07.12 Index]