spaMM (version 2.2.0)

options: spaMM options settings

Description

Allow the user to set and examine a variety of options which affect operations of the spaMM package.

Usage

spaMM.options(…)

spaMM.getOption(x)

Arguments

x

a character string holding an option name.

A named value or a list of named values. The following values, with their defaults, are used in spaMM:

ff_threshold:

Minimal number of matrix elements for some matrices to be stored on disk (using the ff package) rather than in memory

COMP_maxn:

Number of terms for truncation of infinite sums that are evaluated in the fitting of COMPoisson models.

MESSAGES.FULL.STACK=TRUE:

Whether to give information on the stack of calls in some warning messages.

QRmethod:

A character string, to control whether dense matrix or sparse matrix methods are used in intensive matrix computations, overcoming the defaults choices made by spaMM in this respect. Possible values are "dense" and "sparse".

matrix_method:

A character string, to control the factorization of dense model matrices. Default value is "def_sXaug_EigenDense_QR_scaled". "def_sXaug_EigenDense_QRP_scaled" is sometimes useful (see arabidopsis). The source code should be consulted for further information.

Matrix_method:

A character string, to control the factorization of sparse model matrices. Default value is "def_sXaug_Matrix_QRP_scaled". The source code should be consulted for further information.

LevenbergM=NULL:

NULL or boolean. Whether to use a Levenberg-Marquardt algorithm (see Details) by default in most computations. But it is advised to use instead control.HLfit=list(LevenbergM=...) to control this on a case-by-case basis. The joint default behaviour is that Levenberg-Marquardt is used by default for binomial response data that takes only extreme values (in particular, for binary 0/1 response), and that for other models the fitting algorithm switches to it if divergence is suspected. FALSE inhibits its use; TRUE forces its use for all iterative least-square fits, except when 'confint()' is called.

USEEIGEN=TRUE:

Whether to use the Eigen C++ library for some matrix computations.. The source code should be consulted for further information.

wRegularization=FALSE:

Whether to to warn about the use of regularization in some operations on nearly singular matrices.

maxLambda=1e10:

The maximum value of lambda: higher fitted lambda values in HLfit are reduced to this.

example_maxtime=0.8:

Used in the documentation to control whether the longer examples should be run. The approximate running time of given examples on one author's laptop is compared to this value.

nloptr:

Default control values of nloptr calls.

and possibly other undocumented values for development purposes. Additional options without default values can also be used (e.g., see sparse_precision).

Value

For spaMM.getOption, the current value set for option x, or NULL if the option is unset.

For spaMM.options(), a list of all set options. For spaMM.options(name), a list of length one containing the set value, or NULL if it is unset. For uses setting one or more options, a list with the previous values of the options changed (returned invisibly).

Details

spaMM.options() provides an interface for changing maximal values of parameters of the Mat<U+00E9>rn correlation function. However, it is not recommended to change these values unless a spaMM message specifically suggests so. Errors may occur if too low values are chosen as these may conflit with default initial values for the parameters.

By default spaMM use Iteratively Reweighted Least Squares (IRLS) methods to estimate fixed effect parameters. However, a Levenberg-Marquardt algorithm, as described by Nocedal & Wright (1999, p. 266), is also implemented. The Levenberg-Marquardt algorithm is well suited to compute a PQL fit, which is based on maximization of a single function, the h-likelihood. By contrast, in a fit of a mixed model by (RE)ML, one computes jointly fixed-effect estimates that maximizes marginal likelihood, and random-effect values that maximize h-likelihood given the fixed-effect estimates. The Levenberg-Marquardt algorithm is not directly applicable in this case, as it may produce random-effect values that it will accept as increasing marginal likelihood rather than h-likelihood. The (RE)ML variant of the algorithm therefore uses additional nested h-likelihood-maximizing steps for correcting random-effect values.

References

Jorge Nocedal and Stephen J. Wright (1999) Numerical Optimization. Springer-Verlag, New York.

Examples

Run this code
# NOT RUN {
  spaMM.options()
  spaMM.getOption("example_maxtime")
  
# }
# NOT RUN {
  spaMM.options(maxLambda=1e06)
  
# }

Run the code above in your browser using DataLab