options.abrem: 'abrem' Options

Description Usage Arguments Details Value Abrem options To Do Note Author(s) See Also Examples

View source: R/options.abrem.R

Description

This function handles the various calculation, printing and plotting options of the abrem package.

Usage

1

Arguments

...

Options for calculating, printing and plotting with the abrem package.

Details

This function borrows its internal structure from the par function of package graphics. It can be used in different ways:

options.abrem()

Returns the currently used options and there values.

options.abrem()$dist
options.abrem("dist")

Returns the current value of an option.

options.abrem(cl=0.95)
options.abrem(list(cl=0.95,S=5e4))

Sets the specified options.

Currently, there is no way to reset the options to the default values using this function. One might, before changing any options, store the option list in a temporary variable like

abrem.defaults <- options.abrem()

for restoring it later by running options.abrem(abrem.defaults).

The function creates a globally accessible list named options_abrem, holding the options. One should always use the options.abrem function to access the option list, do not access this list directly.

Value

Executing options.abrem without arguments returns a named list containing the currently active global options of the abrem package.

When arguments were supplied, these are returned in a named list.

Abrem options

cex.points

A number describing the relative size of the datapoint glyphs.

Defaults to 1.

cl

Confidence level: A single number from the interval [0,[1 specifying the confidence level for various confidence calculations.

Defaults to 0.9.

col

An integer or character string describing the color of a graphical entity. See function colors for available colors.

Defaults to "black".

col.grid

An integer or character string describing the color of the grid

Defaults to "gray".

conf.blives.sides

Either "lower", "upper" or "double", specifying the type of bound(s) to be calculated.

Defaults to c("double").

conf.what

A vector of class "character" describing for which entities that confidence should be calculated.

Defaults to c("blives").

coordinate.text.size

A number determining the relative coordinate text label size.

Defaults to 0.7.

dist

A character string with the distribution target for fitting. See abrem.fit for in-depth discussion of the settings.

Defaults to "weibull".

in.legend

Logical value controlling the inclusion of various elements in the legend. See abrem.fit and abrem.conf for more details.

Defaults to TRUE.

in.legend.blives

Logical value controlling the inclusion of B-life confidence bounds in the legend.

Defaults to TRUE.

in.legend.gof

Logical value controlling the inclusion of goodness-of-fit indicators in the legend. Note that this does not prohibit calculation of sometimes time consuming prr values, it only prevents inclusion in the legend.

Defaults to TRUE.

is.plot.cb

Logical value controlling the plotting of various types of confidence bounds (if any present in the abrem object).

Defaults to TRUE.

is.plot.fit

Logical value controlling the plotting of the fitted line.

Defaults to TRUE.

is.plot.grid

Logical value controlling the plotting of the grid.

Defaults to TRUE.

is.plot.legend

Logical value controlling the plotting of the legend.

Defaults to TRUE.

is.plot.pp

Logical value controlling the plotting of the (life-)time observations' probability plot positions.

Defaults to TRUE.

label

A character string with the title of the legend box, can be used to label a dataset or fit.

Defaults to NULL.

legend.text.size

A number determining the relative legend text size.

Defaults to 0.7.

log

A character string describing the type of plotting canvas to use. Possible values are "x" (Weibull canvas), "xy" (Lognormal canvas), "" (Weibull Y axis, linear X axis) and "y" (Lognormal Y axis, linear X axis).

Defaults to "x", Weibull canvas. For contour plots, log is always "" and cannot be set.

lty

An integer describing the line type of both the fitted line and the confidence bounds, if any. See function par for available line types.

Defaults to 1.

lwd

An integer describing the line width of both the fitted line and the confidence bounds, if any.

Defaults to 2.

lwd.points

An integer describing the thickness of the datapoint glyphs.

Defaults to 2.

main, main.contour

A character string; the main title of the plot or contour plot.

Defaults to "Probability Plot" or "Contour Plot" .

mar

A numerical vector of the form c(bottom, left, top, right) which gives the number of lines of margin to be specified on the four sides of the plot. See function par for more info.

Defaults to c(5.1,4.1,5.1,2.1).

method.conf.blives

A vector of class "character" describing the techniques used for calculating confidence for B-lives. See abrem.conf for in-depth discussion of the settings.

Defaults to c("mcpivotals").

method.fit

A vector of class "character" with fitting options. See abrem.fit for in-depth discussion of the settings.

Defaults to c("rr","xony").

pch

An integer or single character describing the plotting symbol, used for plotting the datapoints. For more info, see points.

Defaults to 1.

persistent

Experimental parameter, do not use.

Defaults to TRUE.

pivotals

Currently unused. Defaults to FALSE.

pp

pp is short for "probability plot positions", it is a vector of class "character" describing the type of plot positions to be calculated. Possible values are "median" (exact median plot postions calculated using the Incomplete Beta function) and "benard" (a good approximation to the median plot positions). Both options can be supplied at the same time but currently, only the first element in the pp vector will be used for further fitting by abrem.fit

Currently, there are no plans to implement "hazen" and "mean" plotting positions.

Defaults to c("median").

S

An integer describing the number of Monte Carlo simulations on which the Monte Carlo pivotal confidence bounds and calculation of the "prr" goodness-of-fit indicator are based (See prrVal of package pivotals for more details).

Defaults to 10000.

signif

An integer describing the significant digits of various numbers that are displayed in the legend.

Defaults to 4.

sub, sub.contour

A character string; the subtitle of the plot or contour plot.

Defaults to "".

threshold

A logical value specifying whether a threshold time value should be substracted from the graphical elements before plotting. This is particulary useful when fitting three parameter models like weibull3p, where the third model parameter is a threshold value.

If TRUE, the software will subtract the threshold value (that is to be calculated by abrem.fit) from its associated graphical elements like plot poistions, fits and confidence bounds.

If a numeric value is passed, the software will subtract this value from the appropriate graphical elements.

Note: currently, "threshold" should only be used in combination with Abrem and abrem.fit and not with plot.abrem. See abrem.fit for more info.

Defaults to FALSE

unrel

An unordered numeric vector with unreliability levels for which B-life confidence will be calculated.

Defaults to c(0.1,0.05,0.01).

unrel.n

An integer controlling the amount of unreliability levels for which confidence bounds are calculated and ultimately plotted. See abrem.conf for more details.

Defaults to 25

verbosity

An integer from c(1,2,3) setting the level of verbosity of all abrem functions. Use this for debugging.

Defaults to 1.

xlab, ylab

Character strings with the labels for the X and Y axis.

Default to "Time To Failure" and "Unreliability [%]" respectively. For contour plots, Default to "Eta" and "Beta" respectively.

xlim

A numeric vector with two values determining the plotting range of the horizontal axis of the plot. plot.abrem calculates horizontal limits automatically from its data argument.

Defaults to NULL.

ylim

A numeric vector with two values determining the plotting range of the vertical axis of the plot. Allowed values come from the interval ]0,1[. plot.abrem calculates vertical limits automatically from its data argument; if vertical plotting positions do not exceed the standard range of c(0.01,0.99), then the latter is used. Otherwise, the standard range is expanded to include the extreme plot positions.

The standard vertical range is currently hardcoded to c(0.01,0.99).

Defaults to NULL.

To Do

Note

Typical usage of abrem involves calling a sequence of functions like:

da <- Abrem(c(10,11,27))
da <- abrem.fit(da)
da <- abrem.conf(da)
plot(da)

Do not call options.abrem in between these functions because some options are locked and cannot be altered further in this chain. This is an implication of the way the abrem object is structured.

The correct time to specify an option is when it is needed for the first time. For example, when the color setting option col = "red" is passed as an argument of function Abrem, it will be used for datapoints, fits and confidence bounds. If supplied to abrem.conf, only the confidence bounds will have the specified color, hereby overriding any previously inherited color settings from abrem.fit or Abrem.

Author(s)

Jurgen Symynck [email protected]

See Also

Abrem, abrem.fit, abrem.conf, plot.abrem

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
## backup options ##
abrem.defaults <- options.abrem()

## setting new options ##
options.abrem(S=5e5,cl=0.99)


## listing options ##
options.abrem()
options.abrem()$main

## restore options ##
options.abrem(abrem.defaults)

abrem documentation built on Sept. 5, 2017, 3:01 a.m.