| wblr {WeibullR} | R Documentation |
Create a wblr Object for Life Data Analysis
Description
This function creates an object of class "wblr" for further processing
by the other functions of wblr.
Usage
wblr(x, s=NULL, interval=NULL,...)
Arguments
x |
Either a dataframe containing at least |
s |
An optional vector of right-censored data, or suspensions. |
interval |
An optional dataframe of interval data having columns specifically named "left" and "right". Left values are the last time at which no failure was evident and may be zero for discovery. Right values are the earliest time at which failure was observed. |
... |
Graphical options for plotting the |
Details
There are several methods to passing arguments for building an wblr
object.
If argument
xis of class"data.frame", then it must contain$timeand$eventcolumns. Additional columns in the dataframe will be ignored.When a single unnamed vector of class
"numeric"or"integer"is supplied, it is treated as a vector of (life-)time observations.If argument
timeorfailis provided, it is treated as a vector of (life-)time observations. Take care NOT to supply bothtimeandfailin the same function call.If argument
eventis provided, it is treated as a vector of event indicators with possible values of0and1. See section "Value" for more details on event vectors.If the
xargument is not provided as a dataframe andsuspis provided, it is treated as a vector of right-censored (life-)time observations (also called suspended observations or suspensions).
wblr always generates (probability) plot positions for graphically
displaying the (life-)time observations and for (possible) later usage
by wblr.fit. The following optiona arguments are most appropriate for
passing in with wblr:
dist-
A character string defining the distribution target. When used to establish the basis for contour mapping (without using
wblr.confwith 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.
Subsequent calls to wblr.fit and wblr.conf will inherit these options.
Value
A named list of class "wblr". The first list
item ($data) is a list with up to least three items:
$lrq_frame-
A dataframe containing the provided data formatted with
"left","right", and"qty"columns. This is the output of WeibullR function"mleframe". $data$dpoints-
A dataframe contianing graphical data for exact failure point with their probability plotting positions and adjusted ranks.
$data$dlines-
If interval data has been provided this dataframe will contain the graphical data for display similar to
$data$dpoints, but with endpoints t1 and t2 for the interval.
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"
Jurgen Symynck, Filip De Bal, Weibull analysis using R, in a nutshell (New Technologies and Products in Machine Manufacturing Technology, Stefan cel Mare University of Suceava, 2010).
Examples
## These code lines all generate the same object ##
wblr(c(500,1200,900,1300,510))
wblr(time=c(500,1200,900,1300,510))
## this input format works, but not recommended.
wblr(time=c(500,1200,900,1300,510),event=c(1,1,1,1,1))
wblr(fail=c(500,1200,900,1300,510))
wblr(fail=c(500,1200,900,1300,510),susp=c())
da1 <- data.frame(
serial=c("S12","S16","S17","S3","S5"),
time=c(500,1200,900,1300,510),
event=c(1,1,1,1,1))
## it is best practice set named objects
obj1 <- wblr(da1,label="complete dataset",pch=3,col="orange3")
obj2 <- wblr(da1,label="complete dataset",pch=4,pp="benard",col="red")
## Generate a similar dataset, but with suspensions ##
wblr(time=c(500,1200,900,1300,510),event=c(1,1,1,0,0))
wblr(data.frame(time=c(500,1200,900,1300,510),event=c(1,1,1,0,0)))
wblr(fail=c(500,1200,900),susp=c(1300,510))
wblr(time=c(500,1200,900),susp=c(1300,510))
da3 <- wblr(fail=c(500,1200,900,1300,510),
event=c(1,1,1,0,0),label="censored dataset",pch=1,col="blue")
## plot datasets ##
## Not run:
plot.wblr(list(da1,da3))
## End(Not run)