| mp_options | R Documentation |
Create a new options object, or merge information from several objects.
The _get, _set, and _reset functions operate on a global
package options override object. In many cases, setting options in
specific calls to multiprobit() is recommended instead.
mp_options(...)
as.mp_options(x = NULL)
mp_options_default()
mp_options_check(options)
mp_options_get(name = NULL, include_default = FALSE)
mp_options_set(...)
mp_options_reset()
... |
Named options, optionally started by one or more |
x |
An object to be converted to an |
options |
An |
name |
Either |
include_default |
logical; If |
For mp_options and mp_options_set, recognised options are:
logical or numeric; if TRUE, log messages of verbosity
\leq 1 are printed by mp_log_message(). If numeric, log messages
of
verbosity \leq are printed. Default FALSE
logical or numeric; if TRUE, log messages of
verbosity \leq 1 are stored by mp_log_message(). If numeric,
log messages of verbosity \leq are stored. Default: 1
List of options for
excursions::gaussint.
Specific relevant options:
The maximum number of allowed threads for parallel
computing by excursions::gaussint, Default: 0, meaning no limit.
The seed for the internal random number generator for
excursions::gaussint.
List of options for optim(). Relevant options are method
for choosing the optimisation method, and control for setting
convergence criteria and verbose optim() output.
The estimation optimisation strategy. Options: "alternating", "joint", "stepwise". Default: "stepwise"
The maximum number of steps for
strategy == "alternating"
The hessian computation style. Options: "none", "diagonal", "block", and "full". Default: "full"
The name prefix to use for covariate names if the model matrix doesn't have column names. Default: "x_name_"
The name prefix to use for covariate names if the response matrix doesn't have column names. Default: "y_name_"
mp_options_check checks for valid contents of an mp_options
object
mp_options_check() produces warnings for invalid options.
mp_options_set() is used to set global package options.
mp_options_reset() clears the global opption overrides.
mp_options() returns an mp_options object.
For as.mp_options(), NULL or no input returns an empty
mp_options object, a list is converted via mp_options(...),
and mp_options input is passed through. Other types of input generates
an error.
mp_options_default() returns an mp_options object containing
default options.
mp_options_check() returns a logical; TRUE if the object
contains valid options for use by other functions
mp_options_get returns either an mp_options object, for
name == NULL, the contents of single option, if name is a options name
string, or a named list of option contents, if name is a list of option
name strings.
mp_options_set() returns a copy of the global options, invisibly.
mp_options(), mp_options_default(), mp_options_get()
## Not run:
if (interactive()) {
# Compine global and user options:
options1 <- mp_options(mp_options_get(), hessian = "block")
# Create a proto-options object in two equivalent ways:
options2 <- as.mp_options(hessian = "diagonal")
options2 <- as.mp_options(list(hessian = "diagonal"))
# Combine options objects:
options3 <- mp_options(options1, options2)
}
## End(Not run)
## Not run:
if (interactive()) {
# EXAMPLE1
}
## End(Not run)
## Not run:
if (interactive()) {
mp_options_check(mp_options(invalid = "something"))
}
## End(Not run)
## Not run:
if (interactive()) {
# EXAMPLE1
}
## End(Not run)
## Not run:
if (interactive()) {
mp_options_set(
gaussint = list(max.threads = 1),
optim = list(control = list(trace = 5))
)
}
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.