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.fit
for 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 simplyties
as an argument to functionwblr
will silently be accepted asties.handler
. - Options for graphical control over data points see
par
-
pch
Point choice defaults to1
. For more info, seepoints
.cex.points
Point size defaults to1
.lwd.points
Line width defaults to2
.
- Independent graphical control over interval lines
-
interval.col
Color defaults to"black"
.interval.lty
Line type, defaults to"dashed"
.interval.lwd
Line 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_dq
below)."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_dq
below).
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
-
seed
The RNG seed integer such that results are duplicated between runs, default is1234
.S
The number of samples to be run during pivotal analysis, default is1e4
.
- Specific controls for likelihood ratio contour and bounds only
-
dof
The degrees of freedom,dof=1
(default) for confidence interval,dof=2
for comparison.ptDensity
The 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
-
col
Color defaults to"black"
.lty
Line type, defaults to"solid"
.lwd
Line width defaults to2
.
- Graphical controls typically used with
plot
orplot.wblr
-
canvas
The plotting canvas to be used. This does not necessarily have to match the fit distribution. Only"weibull"
(default) or"lognormal"
are recognized.mar
Margins defaults toc(5.1,4.1,5.1,2.1),
.main
Title, defaults to"Probability Plot"
.main.contour
Contour plot title defaults to"Contour Plot"
.sub
Subtitle defaults toNULL
.sub.contour
Contour subtitle defaults toNULL
.xlim
Plot x limits override to be presented as a vector c(lo,hi), defaultNULL
.ylim
Plot y limits override to be presented as a vector c(lo,hi), defaultNULL
.xlab
X axis label defaults to"Time To Failure"
.ylab
Y axis label defaults to"Unreliability [%]"
.coordinate.text.size
default0.7
.signif
Used to control display of numbers in Legend, default4
.col.grid
Color for chart gridlines defaults"grey"
.is.plot.grid
defaultTRUE
.is.plot.fit
defaultTRUE
.is.plot.pp
defaultTRUE
.is.plot.ppcoordinates
defaultFALSE
.is.plot.legend
defaultTRUE
.legend.position
default"bottomright"
. Seelegend
Details.legend.inset
defaultc(0,0)
. legend inset values are fractions of graph width and height.legend.text.size
default0.7
.label
defaults to""
.in.legend
defaultTRUE
.in.legend.blives
defaultTRUE
.in.legend.gof
defaultTRUE
.is.plot.cb
defaultTRUE
.persistent
defaultTRUE
.
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)