Bayesian: Bayesian Spatial Modelling

Description Details Note See Also Examples

Description

RandomFields provides Bayesian modelling to some extend: (i) simulation of hierarchical models at arbitrary depth; (ii) estimation of the parameters of a hierarchical model of depth 1 by means of maximizing the likelihood.

Details

A Bayesian approach can be taken for scalar, real valued model parameters, e.g. the shape parameter nu in the RMmatern model. A random parameter can be passed through a distribution of an existing family, e.g. (dnorm, pnorm, qnorm, rnorm) or self-defined. It is passed without the leading letter d, p, q, r, but as a function call e.g norm(). This function call may contain arguments that must be named, e.g. norm(mean=3, sd=5).

Usage:

The family can be passed in three ways:

The first is more convenient, the second more flexible and slightly safer.

Note

See Also

RMmodelsAdvanced. For hierarchical modelling see RR.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
RFoptions(seed=0) ## *ANY* simulation will have the random seed 0; set
##                   RFoptions(seed=NA) to make them all random again
## See 'RRmodels' for hierarchical models

## the following model defines the argument nu of the Whittle-Matern
## model to be an exponential random variable with rate 5.
model <- ~ 1 + RMwhittle(scale=NA, var=NA, nu=exp(rate=5)) + RMnugget(var=NA)

data(soil)
fit <- RFfit(model, x=soil$x, y=soil$y, data=soil$moisture, modus="careless")
print(fit)

Example output

Loading required package: sp
Loading required package: RandomFieldsUtils

Attaching package: 'RandomFields'

The following object is masked from 'package:RandomFieldsUtils':

    RFoptions


Note that behaviour of 'modus_operandi' has changed within 'RFfit' in version 3.1.0 of RandomFields. Roughly:
what was called 'careless' is now called 'sloppy';
what was called 'sloppy' is now called 'easygoing';
what was called 'easygoing' is now called 'normal';
what was called 'normal' is now called 'precise';
etc.
Note that the option 'modus_operandi' is still in an experimental stage, so that the behaviour may change (slightly) in future.

User's variables:
      whittle.var whittle.s whittle.nu nugget.var      cst
value    4.576851  54.98957  0.3628921   4.572278 11.85625
sd            Inf       Inf        Inf        Inf        -

      #variab loglikelihood           AIC 
       5.0000     -497.4614     1004.9227 

RandomFields documentation built on Jan. 19, 2022, 1:06 a.m.