| options.wblr {WeibullR} | R Documentation |
Options list for wblr Objects
Description
This function handles the various calculation, printing and plotting options for wblr objects.
Usage
options.wblr(...)
Arguments
... |
Options for calculating, printing and plotting |
Details
Typical usage of wblr objects involves calling a sequence of functions each forming
the object, then modifying it in this typical manner:
da <- wblr(c(10,11,27), col="red")
da <- wblr.fit(da, col="darkgreen")
da <- wblr.conf(da), col="blue"
plot(da)
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 wblr, it will be used for
data points, fitted lines and confidence interval bounds. If supplied to wblr.conf,
only the confidence bounds will have the re-specified color, hereby overriding
any previously inherited color settings from wblr.fit
or wblr.
Do not call options.wblr 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 wblr object is structured.
As a function, options.wblr, borrows its internal structure from
the par function of package graphics.
It can be used independently of the typical wblr, wblr.fit, wblr.conf sequence,
but this is discouraged. However, when used independently the following guidance is
provided:
options.wblr()
Returns the currently used options and their values.
options.wblr()$dist
options.wblr("dist")
Returns the current value of an option.
options.wblr(ci=0.95)
options.wblr(list(ci=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
wblr.defaults <- options.wblr()
for restoring it later by running options.wblr(wblr.defaults).
The function creates a globally accessible list named options_wblr,
holding the options. One should always use the options.wblr
function to access the option list, do not access this list directly.
Value
Executing options.wblr without arguments returns a named list
containing the currently active global options of the wblr object.
When arguments are supplied, these are returned in a named list.
wblr options
Options specific to initial wblr object creation with data prepared for graphical display
dist-
A character string defining the distribution target. When used to establish the basis for contour mapping (without using wblr.conf with method.conf="lrb") only "weibull" (default) and "lognormal" are recognized.
Also used withwblr.fitfor specific fitting control. pp-
Plotting position method, it is a character string describing the method of determining vertical plot positions. Implemented methods are "median" (default), "benard","hazen","mean", "kaplan-meier", and "blom".
rank.adj-
The method employed for determining rank of failures when suspensions (right censored data) are present in the data set. Implemented methods are "johnson" (default) and "KMestimator".
ties.handler-
The method employed for handling duplicate values in the data set.
Implemented methods are "none" (default) "highest", "lowest", "mean", and "sequential".
It is expected that ties handling will be applied to large data sets that will be fitted using the maximum likelihood estimation method, where the effect is only on the graphical presentation. Employing a ties handler on a rank regression model will effectively remove data from the data set, which is likely not intended.
Use of simplytiesas an argument to functionwblrwill silently be accepted asties.handler. - Options for graphical control over data points see
par -
pchPoint choice defaults to1. For more info, seepoints.cex.pointsPoint size defaults to1.lwd.pointsLine width defaults to2.
- Independent graphical control over interval lines
-
interval.colColor defaults to"black".interval.ltyLine type, defaults to"dashed".interval.lwdLine width defaults to1.
Options specific to wblr.fit
dist-
A character string defining the distribution target. Recognized values are "weibull" (default), "lognormal","lnorm","lognormal2p", "weibull2p","lognormal3p", and "weibull3p".
method.fit-
A vector of class
"character"with fitting options. Recognized values are "rr-xony" (default), "rr","rr-yonx", "mle","mle-rba", and "mle-unbias".
Options specific to wblr.conf
method.conf-
A character string describing the techniques used for calculating confidence interval bounds. Implemented methods are "pivotal-rr" (default), "bbb", "fm" "fmbounds", and "lrb". Methods must conform to the method.fit in the wblr.fit call immediately preceding the wblr.conf call. Method "pivotal-rr" requires a rank regression fit method. Methods "fm", "fmbounds", and "lrb" require a mle based fit.
dq-
A named series of quantiles at which confidence interval bounds will be calculated.
"abrem"Default. This is the original default by Jurgen Symynck for predecessor package abrem it produces evenly spaced points across the y limits of a weibull canvas attempting to hold a constant number of points (seenum_dqbelow)."minitab"Quantiles matching Minitab(TM) unchangeable defaults (27 values)."supersmith"Quantiles for comparison with SuperSMITH(TM) (limit of 15 values)"user"Provides for a user defined series of quantiles. (seeuser_dqbelow).
num_dq-
The number of points used for the
"abrem"dq determination. user_dq-
A vector of quantiles set by user. Default
c(seq(.01,.09,by=.01),seq(.10,.90,by=.10),seq(.91,.99, by=.01)). ci-
The double-sided confidence interval, also chi sq confidence level for likelihood ratio. Must be in a range <1 && >0, default is
0.9. blife.pts-
The probability points at which to report Blife on legend.
- Specific controls for pivotal analysis only
-
seedThe RNG seed integer such that results are duplicated between runs, default is1234.SThe number of samples to be run during pivotal analysis, default is1e4.
- Specific controls for likelihood ratio contour and bounds only
-
dofThe degrees of freedom,dof=1(default) for confidence interval,dof=2for comparison.ptDensityThe number of points calculated to form the contour outline, default is120.
General graphical options
- Graphical control for fitted lines, confidence bounds, or contours can be set at
wblr, wblr.fit, or wblr.conf functions for individual object control. See
par -
colColor defaults to"black".ltyLine type, defaults to"solid".lwdLine width defaults to2.
- Graphical controls typically used with
plotorplot.wblr -
canvasThe plotting canvas to be used. This does not necessarily have to match the fit distribution. Only"weibull"(default) or"lognormal"are recognized.marMargins defaults toc(5.1,4.1,5.1,2.1),.mainTitle, defaults to"Probability Plot".main.contourContour plot title defaults to"Contour Plot".subSubtitle defaults toNULL.sub.contourContour subtitle defaults toNULL.xlimPlot x limits override to be presented as a vector c(lo,hi), defaultNULL.ylimPlot y limits override to be presented as a vector c(lo,hi), defaultNULL.xlabX axis label defaults to"Time To Failure".ylabY axis label defaults to"Unreliability [%]".coordinate.text.sizedefault0.7.signifUsed to control display of numbers in Legend, default4.col.gridColor for chart gridlines defaults"grey".is.plot.griddefaultTRUE.is.plot.fitdefaultTRUE.is.plot.ppdefaultTRUE.is.plot.ppcoordinatesdefaultFALSE.is.plot.legenddefaultTRUE.legend.positiondefault"bottomright". SeelegendDetails.legend.insetdefaultc(0,0). legend inset values are fractions of graph width and height.legend.text.sizedefault0.7.labeldefaults to"".in.legenddefaultTRUE.in.legend.blivesdefaultTRUE.in.legend.gofdefaultTRUE.is.plot.cbdefaultTRUE.persistentdefaultTRUE.
Examples
## backup options ##
wblr.defaults <- options.wblr()
## setting new options ##
options.wblr(S=5e5,ci=0.99)
## listing options ##
options.wblr()
options.wblr()$main
## restore options ##
options.wblr(wblr.defaults)