checkRF: Numerical and visual check of generated random fields

Description Usage Arguments Examples

View source: R/checkRF.r

Description

Compares generated random fields sample statistics with the theoretically expected values (similar to checkTS). It also returns graphical output for visual check.

Usage

1
checkRF(RF, lags = 30, nfields = 49, method = "stat")

Arguments

RF

output of generateRF

lags

number of lags of empirical STCF to be considered in the graphical output (default set to 30)

nfields

number of fields to be used in the numerical and graphical output (default set to 49). As the plots are arranged in a matrix with nrows as close as possible to ncol, we suggest using values such as 3x3, 3x4, 7x8, etc.

method

report method - 'stat' for basic statistical report, 'statplot' for graphical check of lagged SCS, target STCS, and marginal distribution, 'field' for plotting a matrix of the first nfields, and 'movie' to save the first nfields as a GIF file named "movieRF.gif" in the current working directory

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
## The example below refers to the fitting and simulation of 10 random fields
## of size 10x10 with AR(1) temporal correlation. As the fitting algorithm has
## O((mxm)^3) complexity for a mxm field, this setting allows for quick fitting
## and simulation (short CPU time). However, for a more effective visualization
## and reliable performance assessment, we suggest to generate a larger number
## of fields (e.g. 100 or more) of size about 30X30. This setting needs more
## CPU time but enables more effective comparison of theoretical and
## empirical statistics. Sizes larger than about 50x50 can be unpractical
##  on standard machines.

fit <- fitVAR(
  spacepoints = 10,
  p = 1,
  margdist ='burrXII',
  margarg = list(scale = 3, shape1 = .9, shape2 = .2),
  p0 = 0.8,
  stcsid = "clayton",
  stcsarg = list(scfid = "weibull", tcfid = "weibull",
                 copulaarg = 2,
                 scfarg = list(scale = 20, shape = 0.7),
                tcfarg = list(scale = 1.1, shape = 0.8))
)

sim <- generateRF(n = 12,
                    STmodel = fit)
checkRF(RF = sim,
          lags = 10,
          nfields = 12)

CoSMoS documentation built on May 30, 2021, 1:06 a.m.