contour.abrem: MLE Contour Plotting

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

Description

This function adds the .abrem method to contour from the graphics package.

Currently, the function plots all MLE contours, found in an abrem object or a list of abrem objects.

Usage

1
2
## S3 method for class 'abrem'
contour(x, ...)

Arguments

x

Object of class "abrem" or a list of abrem objects.

...

Options for plotting the contours in the abrem object; see section "Details".

Details

The ... argument can be any graphical parameter that can be supplied to plot.default, and any option that can be set by the function options.abrem. The options set in this way are applied to all graphical elements of the plot, overriding any previously supplied options.

One can pass a list of abrem objects to contour.abrem; in that case it is mandatory to use the full method name: contour.abrem(...) and not contour(...).

Currently, MLE contours are added to the abrem object by calculating Likelihood Ratio confidence bounds for B-lives (see abrem.conf); this function calls the MLEXXXContour function from package debias, where XXX is an abbreviation for a supported distribution. Currently, only two-parameter Weibull is supported, so MLE contours can only be calculated for this distribution. The latter function's output is stored in the abrem object and its output can be used to plot the contours.

When the distribution fitting type is either MLE or MLE-RBA, the MLE point (by definition always calculated with MLE or MLE-RBA) of the contours coincides exactly with the calculated distribution parameters. In all other cases, there will be a spatial difference between the two. In that case, the correct MLE point is added to the plot as a dot.

In the future, calculating contours using a function like abrem.contour() for adding them to the abrem object as well displaying them will be added. to package abrem. In the mean time, check out the contour functions from package debias for customized contour calculations.

As this function is still in development, no legends are currently plotted. However, clever usage ot plot.abrem can provide all necessary information for interpreting the contour plot (see section "Examples").

Value

Currently, the function returns no value.

Author(s)

Jurgen Symynck jusy@openreliability.org

See Also

options.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
27
28
29
30
31
32
33
## some standard options ##
defaults <- options.abrem()
options.abrem(method.conf.blives="lrb",is.plot.cb=FALSE)

## simple example ##
da <- abrem.fit(Abrem(c(round(rweibull(5,3,1000)))))
da <- abrem.conf(da)
par(mfrow=c(1,2))
plot(da)
contour(da)

##      multiple datasets and contours       ##
## while prevention excessive plotting of CB ##
defaults <- options.abrem()
fail1 <- c(round(rweibull(5,1,1000)))
fail2 <- c(round(rweibull(8,2,3000)))

da1 <- abrem.fit(Abrem(time=fail1,pch=0,col="red",label="First test batch"))
da2 <- abrem.fit(Abrem(time=fail2,pch=4,col="blue",label="Second test batch"))

da1 <- abrem.conf(da1,cl=0.5 ,in.legend=FALSE)
da1 <- abrem.conf(da1,cl=0.9 ,is.plot.cb=TRUE)
da1 <- abrem.conf(da1,cl=0.95,in.legend=FALSE)
da2 <- abrem.conf(da2,cl=0.5 ,in.legend=FALSE)
da2 <- abrem.conf(da2,cl=0.9 ,is.plot.cb=TRUE)
da2 <- abrem.conf(da2,cl=0.95,in.legend=FALSE)
    # prevent plotting of some confidence bounds to not overload the plot,
    # also prevent inclusion in the legend.
set <- list(da1,da2)
par(mfrow=c(1,2))
plot.abrem(set,xlim=c(5,5e5))
contour.abrem(set)
options.abrem(defaults)

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