Learn R Programming

RandomFields (version 3.0.35)

RFoptions: Setting control arguments

Description

RFoptions sets and returns control arguments for the analysis and the simulation of random fields

Usage

RFoptions(..., no.readonly = TRUE)

Arguments

...
arguments in tag = value form, or a list of tagged values.
no.readonly
If RFoptions is called without argument then all arguments are returned in a list. If no.readonly=TRUE then only rewritable arguments are returned.

Value

  • NULL if any argument is given, and the full list of arguments, otherwise.

    if no.readonly=FALSE then additionally, the last element of the list is itself a list containing * covnr: number of currently implemented variogram/covariance models (-1 means that none of the functions like RFsimulate, RFfit , etc., have been called yet.) * distrmaxchar: max. name length for a distribution * distrnr: number of currently implemented distributions * maxdim: maximum number of dimensions for a random field * maxmodels: maximum number of elementary models in definition of a complex covariance model * methodmaxchar: max. name length for methods * methodnr: number of currently implemented simulation methods

bold

  • 9. gauss: Options for simulating Gaussian random fields
  • 10. graphics: Options for graphical output

describe

  • approx_zeroValue below which a correlation is considered to be essentially zero. This argument is used to determine the practical range of covariance function with non-compact support. Default: 0.05
  • direct_bestvarinteger. When searching for an appropriate simuation method the matrix decomposition method (method="direct") is preferred if the number of variables is less than or equal to direct_bestvariables. Default is 800.
  • loggaussSee RPgauss
  • paired(Antithetic pairs.) Logical. If TRUE then the second half of the simulations is logical. If TRUE then the second half of the simulations is obtained by only changing the signs of all the standard Gaussian random variables, on which the first half of the simulations is based. Default is FALSE.
  • stationary_onlySee RPgauss

Details

The subsections below comment on options for 1. general: General options 2. br: Options for Brown-Resnick Fields 3. circulant: Options for circulant embedding methods, cf.RPcirculant 4. coords: Options for coordinates and units 5. direct: Options for simulating by simple matrix decomposition 6. distr: Options for distributions, in particular RRrectangular 7. empvario: Options for calculating the empirical variogram 8. fit: Options for RFfit, RFratiotest, and RFcrossvalidate 9. gauss: Options for simulating Gaussian random fields 10. graphics: Options for graphical output 11. gui: Options for cRFgui 12. hyper: Options for simulating hyperplane tessellations 13. krige: Options for Kriging 14. maxstable: Options for simulating max-stable random fields 15. mpp: Options for the random coins (shot noise) methods 16. nugget: Options for the nugget effect 17. registers: Register numbers 18. sequ: Options for the sequential method 19. special: Options for some special methods 20. spectral: Options for the spectral (turning bands) method 21. tbm: Options for the turning bands method 22. internal: Internal General comments 1. General options [object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]2. Options for Brown-Resnick Fields [object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object] 3. circulant: Options for circulant embedding methods, cf. RPcirculant These options influence the standard circulant embedding method, cutoff circulant embedding intrinsic circulant embedding. It can also influence RPtbm if the line is simulated with any circulant embedding method. [object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]4. coords: Options for coordinates and units [object Object],[object Object],[object Object],[object Object],[object Object]5. direct: Options for simulating by simple matrix decomposition [object Object],[object Object],[object Object]6. distr: Options for distributions, in particular RRrectangular [object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]7. empvario: Options for calculating the empirical variogram [object Object],[object Object],[object Object],[object Object],[object Object] 8. fit: Options for RFfit, RFratiotest, and RFcrossvalidate The following comments on RFfit apply also to RFratiotest.

[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Default: 'respect bound'.

refine_onborder{ } minmixedvar{ lower bound for variance in a mixed model; so, the covariance model for mixed model part might be calibrated appropriately } solvesigma{Boolean -- experimental stage! If a mixed effect part is present where the variance has to be estimated, then this variance parameter is solved iteratively within the profile likelihood function, if solvesigma=TRUE.This makes sense if the number of independent variables is very small. If solvesigma=FALSE then the variance parameter is treated as any other parameter to be estimated. } ratiotest_approx{logical. if TRUE the approximative formula that twice the difference of the likelihoods follow about a $\chi^2$ distribution is used. The parameter of freedom equals the number of parameters to be estimated for the covariance function, including those for the covariates. } reoptimise{logical. If TRUE && !only_users then at a very last step, the optimisation is redone with currently best parameters and likelihood as scale parameter for optim. Default: TRUE. }

scale_max_relative_factor{ If the initial scale value for the ML estimation obtained by the LSQ target function is less than $(minimum distance between different pairs of points) /$ scale_max_relative_factor a warning is given that probably a nugget effect is present. Note: if scale_max_relative_factor is greater than lowerbound_scale_ls_factor then no warning is given as the scale has the lower bound $(minimum distance between different pairs of points) /$ lowerbound_scale_ls_factor. Default: 1000 }

scale_ratio{ RFfit uses parscale and fnscale in the calls of optim. As these arguments should have the magnitude of the estimated values, RFfit checks this by calculating the absolute log ratios. If they are larger than scale_ratio, parscale and fnscale are reset and the optimisation is redone. Default: 0.1. } shortnamelength{ The names of the variables in the returned table are abbreviated by taking the first shortnamelength letters. Default: 4. } sill{ Additionally to estimating nugget and variance separately, they may also be estimated together under the condition that nugget + variance = sill. For the latter a finite value for sill has to be supplied, and nugget and variance are set to NA. sill is only used for the standard model. Default: NA. }

smalldataset{ Default: 2000. } split{logical. If TRUE then RFfit checks whether a space-time covariance model or a multivariate covariance model can be split into components, so that certain parameters can be estimated separately. Default: TRUE. } splitn_neighbours{integer. In case the maximum number of locations maxn is exceeded, then RFfit tries to split the data set into parts of size split or less, but never more than maxn. Default: c(3000, 200, 1000). } splitfactor_neighbours{ The total number of neighbouring boxes in each direction $1 + 2\code{splitfactor}$, including the current box itself. Default: 2. } split_refined{logical. If TRUE then also submodels are fitted if splitted. This takes more time, but anova and RFratiotest, for instance, will give additional information.

Default: TRUE. } upperbound_scale_factor{ The upper bound for the scale is determined as upperbound_scale_factor$* (maximum distance between all pairs of points)$. Default: 3. } upperbound_var_factor{ The upper bound for the variance and the nugget is determined as upperbound_var_factor * var(data) Default: 10. }

use_naturalscaling{ logical. Only used if model is given in standard (simple) way. If TRUE then internally, rescaled covariance functions will be used for which cov(1)$\approx$0.05. use_naturalscaling has the advantage that scale and the form parameters of the model get orthogonal, but use_naturalscaling does not work for all models. Note that this argument does not influence the output of RFfit: the parameter vector returned by RFfit refers always to the standard covariance model as given in RMmodel. (In contrast to practicalrange in RFoptions.) Advantages if use_naturalscaling=TRUE:

  • scaleand the shape parameter of a parameterised covariance model can be estimated better if they are estimated simultaneously.
  • The estimated bounds calculated by means ofupperbound_scale_factorandlowerbound_scale_factor, etc. might be more realistic.
  • in case of anisotropic models, the inverse of the elements of the anisotropy matrix should be in the above bounds.
Disadvantages if use_naturalscaling=TRUE:
  • For some covariance models with additional parameters, the rescaling factor has to be determined numerically. Then, more time is needed to performRFfit.
Default: TRUE. }

use_spam{ Should the package spam (sparse matrices) be used for matrix calculations? Default: NA. }

References

Schlather, M. (1999) An introduction to positive definite functions and to unconditional simulation of random fields. Technical report ST 99-10, Dept. of Maths and Statistics, Lancaster University.

Oesting, M., Schlather, M. and Zhou, C. (2013) On the Normalized Spectral Representation of Max-Stable Processes on a compact set. arXiv, 1310.1813

See Also

RFsimulate, RFoptionsAdvanced, RandomFields, and RFgetMethodNames.

Examples

Run this code
RFoptions(seed=0) ## *ANY* simulation will have the random seed 0; set
##                   RFoptions(seed=NA) to make them all random again
RFoptions()


############################################################
##                                                        ## 
## use of exactness                                       ##
##                                                        ##
############################################################
x <- seq(0, 1, if (interactive()) 1/30 else 0.5)
model <- RMgauss()

for (exactness in c(NA, FALSE, TRUE)) { 
  readline(paste("exactness: `", exactness, "'; press return"))
  z <- RFsimulate(model, x, x, exactness=exactness,
                  stationary_only=NA, storing=TRUE)
  print(RFgetModelInfo(which="internal")$internal$name)
}

FinalizeExample()

Run the code above in your browser using DataLab