RFoptions {RandomFieldsUtils}R Documentation

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. Currenlty all arguments are rewritable. So the list is empty.

Details

The subsections below comment on
1. basic: Basic options
2. solve: Options for solving linear systems

1. Basic options

asList

logical. Lists of arguments are treated slightly different from non-lists. If asList=FALSE they are treated the same way as non-lists. This options being set to FALSE after calling RFoptions it should be set as first element of a list.

Default: TRUE

cores

Number of cores for multicore algorithms; currently only used for the Cholesky decomposition.

Default : 1

cPrintlevel

cPrintlevel is automatically set to printlevel when printlevel is changed. Standard users will never use a value higher than 3.

0 : no messages
1 : messages and warnings when the user's input looks odd
2 : messages (and internal errors) documenting the choice of the simulation method
3 : further user relevant informations
4 : information on recursive function calls
5 : function flow information of central functions
6 : errors that are internally treated
7 : details on building up the covariance structure
8 : details on taking the square root of the covariance matrix
9 : details on intermediate calculations
10 : further details on intermediate calculations

Note that printlevel works on the R level whereas cPrintlevel works on the C level.

Default: 1

printlevel

If printlevel<=0 there is not any output on the screen. The higher the number the more tracing information is given. Standard users will never use a value higher than 3.

0 : no messages
1 : important (error) messages and warnings
2 : less important messages
3 : details, but still for the user
4 : recursive call tracing
5 : function flow information of large functions
6 : errors that are internally treated
7 : details on intermediate calculations
8 : further details on intermediate calculations

Default: 1

seed

integer (currently only used by the package RandomFields). If NULL or NA set.seed is not called. Otherwise, set.seed(seed) is set before any simulations are performed.

If the argument is set locally, i.e., within a function, it has the usual local effect. If it is set globally, i.e. by RFoptions the seed is fixed for all subsequent calls.

If the number of simulations n is greater than one and if RFoptions(seed=seed) is set, the ith simulation is started with the seed ‘seed+i-1’.

skipchecks

logical. If TRUE, several checks whether the given parameter values and the dimension are within the allowed range is skipped. Do not change the value of this variable except you really know what you do.

Default: FALSE $

verbose

logical. If FALSE it identical to printlevel = 1 else to printlevel = 2.

2. solve: Options for solving linear systems

max_chol

integer. Maximum number of rows of a matrix in a Cholesky decomposition

Default: 8192

max_svn

integer. Maximum number of rows of a matrix in a svd decomposition

Default: 6555

solve_method

vector of at most 3 integers that gives the sequence of methods in order to inverse a matrix or to calculate its square root: "cholesky", "svd", "eigen" "sparse", "method undefined". In the latter case, the algorithm decides which method might suit best.

Note that if use_spam is not false the algorithm checks whether a sparse matrix algorithm should be used and which is then tried first.

Default: "method undefined".

spam_factor

integer. See argument spam_sample_n.

Default: 4294967

spam_min_n

integer. Has the matrix

Default: 400

spam_min_p

number in (0,1) giving the proportion of zero about which an sparse matrix algorithm is used.

Default: 0.8

spam_pivot

integer. Pivoting algorithm for sparse matrices: 0:none; 1:MMD, 2:RCM

See package spam for details.

Default: 1

spam_sample_n

Whether a matrix is sparse or not is tested by a ‘random’ sample of size spam_sample_n; The selection of the sample is iteratively obtained by multiplying the index by spam_factor modulo the size of the matrix.

Default: 500.

spam_tol

largest absolute value being considered as zero. Default: DBL_EPSILON

svdtol

Internal. When the svd decomposition is used for calculating the square root of a matrix then the absolute componentwise difference between this matrix and the square of the square root must be less than svdtol. No check is performed if svdtol is not positive.

Default: 0

eigen2zero

When the svd or eigen decomposition is calculated, all values with modulus less than or equal to eigen2zero are set to zero.

Default: 1e-12

use_spam

Should the package spam (sparse matrices) be used for matrix calculations? If TRUE spam is always used. If FALSE, it is never used. If NA its use is determined by the size and the sparsity of the matrix.

Default: NA.

Value

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

Author(s)

Martin Schlather, schlather@math.uni-mannheim.de http://ms.math.uni-mannheim.de/de/publications/software

Examples


if (FALSE) {
  n <- 500
  M <- matrix(rnorm(n * n), nc=n)
  M <- M %*% t(M)
  system.time(chol(M))
  system.time(cholesky(M))
  RFoptions(cores = 2)
  system.time(cholesky(M))
}


[Package RandomFieldsUtils version 0.3.25 Index]