inla.knmodels.sample {INLA} | R Documentation

## Spacetime interaction models sampler function

### Description

It implements the sampling method for the models in Knorr-Held, L. (2000) considering the algorithm 3.1 in Rue & Held (2005) book.

### Usage

    inla.knmodels.sample(
      graph,
      m,
      type = 4,
      intercept = 0,
      tau.t = 1,
      phi.t = 0.7,
      tau.s = 1,
      phi.s = 0.7,
      tau.st = 1,
      ev.t = NULL,
      ev.s = NULL
    )

### Arguments

`graph` | Model graph definition
`m` | Time dimention.
`type` | Integer from 1 to 4 to identify one of the four interaction type.
`intercept` | A constant to be added to the linear predictor
`tau.t` | Precision parameter for the main temporal effect.
`phi.t` | Mixing parameter in the `bym2` model assumed for the main temporal effect.
`tau.s` | Precision parameter for the main spatial effect.
`phi.s` | Mixing parameter in the `bym2` model assumed for the main spatial effect.
`tau.st` | Precision parameter for the spacetime effect.
`ev.t` | Eigenvalues and eigenvectors of the temporal precision matrix structure.
`ev.s` | Eigenvalues and eigenvectors of the spatial precision matrix structure.

### Value

A list with the following elements

`time` | The time index for each obervation, with length equals `m*n`.
`space` | The spatial index for each observation, with length equals `m*n`.
`spacetime` | The spacetime index for each obervation, with length equals `m*n`.
`x` | A list with the following elements
`t.iid` | The unstructured main temporal effect part.
`t.str` | The structured main temporal effect part.
`t` | The main temporal effect with length equals `⁠2m⁠`.
`s.iid` | The unstructured main spatial effect part.
`s.str` | The structured main spatial effect part.
`s` | The main spatial effect with length equals `⁠2n⁠`.
`st` | The spacetime interaction effect with length `m*n`.
`eta` | The linear predictor with length `n*m`.

### Author(s)

Elias T. Krainski

### See Also

`inla.knmodels()` for model fitting

[Package INLA version 26.02.05 Index]