Learn R Programming

RandomFields (version 3.0.5)

Random parameters: Random parameters

Description

Random parameters in the model definition

Arguments

Implemented models

ll{ RRdeterm no scattering RRdistr generic definition of a family of distributions for RandomFields based on the distribution families of R RRgauss a (multivariate) Gaussian random variable RRspherical random scale for the RMball to simulate RMspheric, etc. RRunif a (multivariate) uniform random variable }

Details

When simulating Gaussian random fields, the random parameters are drawn only once at the very beginning. So, if the parameter n in RFsimulate is greater than 1 then n simulations conditional on a single realisation of the random parameters are performed. See the examples below.

There are (simple) multivariate version and additional version to the distributions families implemented. Further, any distribution family defined in R can be used, see the examples below These function will allow for Baysian modelling. (Future project).

See Also

Other models, RF, RFdistr, RM, RMmodelgenerator, RP, RRdistr, RRgauss, RRspherical

Examples

Run this code
set.seed(0)
## here, the scale is given by an exponential variable:
model <- RMgauss(scale=exp())
for (i in 1:4) {
  # each leads to a simulation with a different scale parameter
  plot(model) ## random !
  plot(RFsimulate(model, x=seq(0,10,0.1)))
  readline("press return")
}

# but here, all 4 simulation have same (but random) scale:
  plot(RFsimulate(model, x=seq(0,10,0.1), n=4)) 

\dontrun{
## hierarchical models are also possible:
## here, the scale is given by an exponential variable whose
## rate is given by a uniform variable
model <- RMgauss(scale=exp(rate=unif()))
plot(model)
plot(RFsimulate(model, x=seq(0,10,0.1)))
}

Run the code above in your browser using DataLab