wblr.conf: Add Confidence Interval Bounds to 'wblr' Objects

View source: R/wblr.conf.R

wblr.confR Documentation

Add Confidence Interval Bounds to wblr Objects

Description

This function adds confidence calculations to the last fit entity in a wblr object.

Usage

wblr.conf(x,...)

Arguments

x

Object of class "wblr".

...

Options for calculating confidence, and for plotting the results.

Details

This function adds confidence calculations to the last fit entity in a wblr object and adds the result to the object alongside any pre-existing confidence calculations.

Certain confidence calculations pertain to specific fit methods. The pivotal.rr confidence method can only apply to a rank regression fit, while a likelihood ratio calculation can only be performed on an mle fit.

Option arguments suitable for passing into 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 (see num_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. (see user_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 is 1234.

  • S The number of samples to be run during pivotal analysis, default is 1e4.

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 is 120.

Additionally, graphical control options for the confidence interval bounds can be passed in with the following options:

  • col Color defaults to "black".

  • lty Line type, defaults to "solid".

  • lwd Line width defaults to 2.

Subsequent calls to wblr.fit and wblr.conf will inherit these options.

Value

The function returns its argument x, extended with the confidence calculations and any optional graphical and calculation arguments as passed to the function.

References

William Q. Meeker and Luis A. Escobar, (1998) "Statistical Methods for Reliability Data", Wiley-Interscience, New York

Robert B. Abernethy, (2008) "The New Weibull Handbook, Fifth Edition"

John I. McCool, (2012) "Using the Weibull Distribution: Reliability, Modeling and Inference"

Examples

## full dataset ##
da1 <- wblr(runif(10,100,1e4),label="Complete data")
da1 <- wblr.fit(da1)
da1 <- wblr.conf(da1,method.conf="pivotal-rr",col="red")
da1 <- wblr.conf(da1,method.conf="bbb",col="orange")
da1 <- wblr.fit(da1, method.fit="mle")
da1 <- wblr.conf(da1,method.conf="lrb",col="yellow3")

## plot datasets ##
## Not run: 
plot(da1,main="Comparison between different bound types.")

## End(Not run)

## with right-censored data
da2 <- runif(8,100,1e4)
da2 <- wblr(fail=da2,susp=rep(max(da2),2),label="Type II right-censored data")
da2 <- wblr.fit(da2)
da2 <- wblr.conf(da2,method.conf="pivotal-rr",col="blue1")
da2 <- wblr.conf(da2,method.conf="bbb",col="steelblue")
da2 <- wblr.fit(da2, method.fit="mle")
da2 <- wblr.conf(da2,method.conf="lrb",col="cyan3")
## Not run: 
plot(da2,main="Comparison between different bound types with right-censored data.")

## End(Not run)

WeibullR documentation built on June 26, 2022, 1:06 a.m.