Skip to contents

FUNCTION_DESCRIPTION

Usage

param2.matern_calc(
  dim = NULL,
  dof = NULL,
  alpha = 2,
  prior_range = NULL,
  prior_sigma = NULL,
  B_range = matrix(c(0, 1, 0), 1, 3),
  B_sigma = matrix(c(0, 0, 1), 1, 3),
  prior_theta = NULL,
  ...
)

Arguments

dim

PARAM_DESCRIPTION, Default: NULL

dof

PARAM_DESCRIPTION, Default: NULL

alpha

PARAM_DESCRIPTION, Default: 2

prior_range

list(median, factor), Default: factor=5

prior_sigma

list(median, factor), Default: factor=5

B_range

PARAM_DESCRIPTION, Default: matrix(c(0, 1, 0), 1, 3)

B_sigma

PARAM_DESCRIPTION, Default: matrix(c(0, 0, 1), 1, 3)

prior_theta

If not NULL, prior_range and prior_sigma will only be used to set the offset columns of B_range and B_sigma, and not to set the prior distribution for the theta parameters. A list with elements mean and prec. Default: NULL

...

PARAM_DESCRIPTION

Value

OUTPUT_DESCRIPTION

Details

The priors for range (the spatial correlation range parameter) and sigma (the field standard deviation parameter) are constructed so that the prior median is given by median, and $$P(median/factor < param < median*factor) = 0.98$$ which means that the std.dev. of log(param) is log(factor)/stats::qnorm(0.99).

Remark: In the old param2.matern.orig function, the internal parameter scale used a default prior precision \(0.1\). This corresponds to factor=exp(stats::qnorm((1+0.98)/2)/sqrt(0.1)), that equals \(1566.435\). This large value has lead to numerical and other problems for many models.

Examples

if (FALSE) { # \dontrun{
if (interactive()) {
  # EXAMPLE1
}
} # }