simulateGMRF: Simulate 2D Mat\'ern Field Using Markov Approximation.

Description Usage Arguments Details Value References Examples

Description

Simulate stationary and isotropic 2D Mat\'ern Gaussian random field using Markov approximation in a grid. Also conditional with given data.

Usage

1
2
3
4
5
6
simulateGMRF(ncol=50, nrow=50, tau=3, range=0.3, nu=2, expand,
             xlim=c(0,1), ylim=c(0,1), cyclic=FALSE, dbg=0)
simulate_condGMRF(ncol=50, nrow=50, tau=5, range=0.2, nu=2, 
                  expand, xlim=c(0,1), ylim=c(0,1), 
                  data=list(x=.5, y=.5, v=0), 
                  cyclic=FALSE, dbg=0, use.RandomFields=FALSE, ...)

Arguments

ncol, nrow

Grid dimensions. ncol in x direction.

xlim, ylim

Spatial dimensions, rectangular window.

expand

Expansion of the grid for border bias elimination. If not given, computed using nu.

tau

Precision i.e. inverse variance.

range

Range of covariance, controls smoothness.

nu

The differentiability parameter of covariance. Accepts: 1,2,3.

cyclic

Use cyclic (toroidal) grid.

dbg

Verbose output during simulation.

use.RandomFields

Option to use randomFields package for conditional simulation.

...

If using randomFields, these are passed on to the CondSimu-function.

data

List with components x,y and v giving the x- and y-coordinates of values v for conditional simulation.

Details

The stationary and isotropic Mat\'ern covariance function at distance t is

C(t) \propto tau*(kappa*t)^nu K_{nu}(kappa*t)

where tau is the precision (inverse variance), nu is differentiability of the covariance, and kappa is the scale. We use a transformed kappa called range r=sqrt(8*nu)/kappa so that C(r)~=0.1.

The simulation is done using Markov approximation, see Held \& Rue 2005 and Lindgren et al 2011. Hence the term GMRF: Gaussian Markov Random Field.

Value

Object of class rfhcField which is the same as object of class im with the simulation parameters stored in the element $parameters.

References

Held, Rue (2005) Gaussian Markov Random Fields: Theory and Applications. Chapman&Hall/CRC.

Lindgren, Rue, Lindst\"om (2011) An explicit link between Gaussian fields and Gaussian Markov random fields: the stochastic partial differential equation approach J. R. Statistic. Soc. B. 73.

Examples

1
2
 y<-simulateGMRF()
 plot(y)

antiphon/rfhc documentation built on May 10, 2019, 12:20 p.m.