abrem.conf: Add Confidence to 'abrem' Objects

Description Usage Arguments Details Value Warning Note Author(s) See Also Examples

Description

This function adds confidence calculations to various entities in abrem objects.

Usage

1
abrem.conf(x,which="all",...)

Arguments

x

Object of class "abrem".

which

Calculate which fit in the abrem object will be processed.

...

Options for calculating confidence, and for plotting the results.

Details

This function adds confidence calculations to various entities in abrem objects and adds them to the object alongside any pre-existing confidence calculations.

Additional options for calculating B-life confidence are passed with:

cl

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

Defaults to 0.9.

conf.blives.sides

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

Defaults to c("double"), the other options are currently not implemented.

unrel.n

An integer controlling the amount of unreliability levels for which B-life confidence bounds are calculated and ultimately plotted.

Higher numbers will result in smoother confidence bounds. In any case, confidence intervals will be calculated for:

  • the B-lives at unreliability levels specified with option unrel

  • the B-life at 50 [%] unreliability

  • the B-life at the calculcate characteristic life or logmean (depending on the fitted distribution)

Note: When plotting fits and confidence bounds that are adjusted with a threshold (see option "threshold"), it is often the case that the bounds appear to be cut of on the left. This can be countered by dramatically increasing unrel.n, resulting in confidence bounds that extend to the edge of the plotting area.

Defaults to 25.

conf.what

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

Defaults to c("blives"), the only type currently supported.

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).

method.conf.blives

A vector of class "character" describing the technique to be used for calculating confidence for B-lives. Possible values are "bbb" (Beta Binomial confidence bounds), "lrb" (Likelihood Ratio confidence bounds) and "mcpivotals" or "mcpivotal" (Monte Carlo Pivotal confidence bounds).

Monte Carlo Pivotal confidence bounds use a large number of simulations to calculate the confidence bounds. See option "S" for more info.

Defaults to c("mcpivotals").

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.

High values are needed for good confidence bounds at the lower end of the fitted model, especially for data with heavy censoring.

Note that S >= 100 and that S must be divisible by 10.

Defaults to 10000.

in.legend

Logical value controlling the inclusion of confidence calculation results in the legend.

If in.legend=FALSE is passed , the resulting confidence calculations will be omitted from the legend.

Defaults to TRUE.

Additionally, one can pass any options available from options.abrem, such as col or is.plot.legend. The graphical options will be used when plotting the (life-)time observations using plot.abrem.

Value

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

Warning

Currently, the Monte Carlo pivotal confidence bounds are only identical to superSMITH's MC pivotal bounds for complete, uncensored data. For heavily censored datasets with few failures, the bounds appear more optimistic than superSMITH's bounds. Research on this issue is ongoing.

Note

Author(s)

Jurgen Symynck jusy@openreliability.org

See Also

options.abrem, contour.abrem

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
## full dataset ##
da1 <- Abrem(runif(10,100,1e4),label="Complete data")
da1 <- abrem.fit(da1)
da1 <- abrem.conf(da1,method.conf.blives="mcpivotals",col="red")
da1 <- abrem.conf(da1,method.conf.blives="bbb",col="orange")
da1 <- abrem.conf(da1,method.conf.blives="lrb",col="yellow3")
print(da1$fit[[1]]$conf$blives[[1]])
plot(da1,main="Comparison between MC Pivotal bounds and BB Bounds")

## censored dataset: generates a warning for MC Pivotal confidence bounds ##
da2 <- runif(8,100,1e4)
da2 <- Abrem(fail=da2,susp=rep(max(da2),2),label="Type II censored data")
    # generate a 'type 2' censored dataset
da2 <- abrem.fit(da2)
da2 <- abrem.conf(da2,method.conf.blives="mcpivotals",col="blue1")
da2 <- abrem.conf(da2,method.conf.blives="bbb",col="steelblue")
da2 <- abrem.conf(da2,method.conf.blives="lrb",col="cyan3")
plot(da2,main="Comparison between different bound types.")

## show variability in Monte Carlo Pivotal bounds with low S ##
da3 <- Abrem(rweibull(5,3,1000))
da3 <- abrem.fit(da3)
for(i in 1:20) da3 <- abrem.conf(da3,S=1000,lwd=1,col="red")
    # just keep adding bounds to the abrem object...
plot(da3,is.plot.legend=FALSE,
    main="Variability in MC Pivotal Conf. Bounds for S=1000")

abrem documentation built on May 2, 2019, 4:49 p.m.