pc.multvar {INLA} | R Documentation

## Multivariate PC priors

### Description

Functions to evaluate and simulate from multivariate PC priors: The simplex and sphere case

### Usage

    inla.pc.multvar.h.default(x, inverse = FALSE, derivative = FALSE)

    inla.pc.multvar.simplex.r(
      n = NULL,
      lambda = 1,
      h = inla.pc.multvar.h.default,
      b = NULL
    )

    inla.pc.multvar.simplex.d(
      x = NULL,
      lambda = 1,
      log = FALSE,
      h = inla.pc.multvar.h.default,
      b = NULL
    )

    inla.pc.multvar.sphere.r(
      n = NULL,
      lambda = 1,
      h = inla.pc.multvar.h.default,
      H = NULL
    )

    inla.pc.multvar.sphere.d(
      x = NULL,
      lambda = 1,
      log = FALSE,
      h = inla.pc.multvar.h.default,
      H = NULL
    )

### Arguments

`x` | Samples to evaluate. If input is a matrix then each row is a sample. If input is a vector then this is the sample.
`inverse` | Compute the inverse of the h()-function.
`derivative` | Compute the derivative of the h()-function. (derivative of the inverse function is not used).
`n` | Number of samples to generate.
`lambda` | The lambda-parameter in the PC-prior.
`h` | The h()-function, defaults to `inla.pc.multvar.h.default`. See that code for an example of how to write a user-specific function.
`b` | The b-vector (gradient) in the expression for the simplex option, `⁠d(xi) = h(b^T xi)⁠`
`log` | Evaluate the density in log-scale or ordinary scale.
`H` | The H(essian)-matrix in the expression for the sphere option, `⁠d(xi) = h(1/2 *xi^T H xi)⁠`. If `H` is a vector, then it is interpreted as the diagonal of a (sparse) diagonal matrix.

### Details

These functions implements multivariate PC-priors of the simplex and sphere type.

### Value

`inla.pc.multvar.simplex.r` generate samples from the simplex case, and `inla.pc.multvar.simplex.d` evaluate the density. `inla.pc.multvar.sphere.r` generate samples from the sphere case, and `inla.pc.multvar.sphere.d` evaluate the density. `inla.pc.multvar.h.default` implements the default h()-function and illustrate how to code your own specific one, if needed.

### Author(s)

Havard Rue hrue@r-inla.org

[Package INLA version 26.02.05 Index]