Description Usage Arguments Details Value Author(s) See Also Examples
This function creates an object of class "abrem"
for further processing
by the other functions of abrem.
1 |
x |
Either a dataframe containing at least See section "Details" for other data passing arguments. |
... |
Graphical options for plotting the |
There are several methods to passing arguments for building an abrem
object.
When a single unnamed vector of class "numeric"
or "integer"
is supplied, it is treated as a vector
of (life-)time observations.
If argument time
or fail
is provided, it is treated as
a vector of (life-)time observations. Take care NOT to supply both
time
and fail
in the same function call.
If argument event
is provided, it is treated as
a vector of event indicators with possible values of
0
and 1
. See section "Value" for more details on
event vectors.
If argument susp
is provided, it is treated as
a vector of right-censored (life-)time observations (also called
suspended observations or suspensions).
In that case, argument time
or fail
is mandatory and is
treated as a vector of failure times.
If argument x
is of class "data.frame"
,
then it should al least contain $time
and $event
columns. Additional columns in the dataframe will be reused in the
abrem
object, allowing for extra information like
serial numbers to be included (see section "Examples").
Note that is is currently allowed to have NA
values in the
time
argument. In that case, the vector is expected to be
ordered and no ordering will be applied by Abrem
. This feature is
useful in combination with the output of params.to.ob
.
Abrem
always generates (probability) plot positions for graphically
displaying the (life-)time observations and for (possible) later usage
by abrem.fit
. The type of plot positions is
controlled with the pp
argument.
See options.abrem
for more details.
Additionally, one can supply any options available from options.abrem
,
such as col
or is.plot.legend
. Some of these options
will be used when plotting the (life-)time observations using plot.abrem
.
Subsequent calls to abrem.fit
and abrem.conf
will inherit these options.
A named list of class "abrem"
. The first list
item ($data
) is a dataframe with at least three columns:
$time
An ordered vector with (life-)time observations.
$event
A vector of class "numeric"
with right-censoring indicators.
Values of 1
mean "dead" or "failed" while 0
mean "alive" or "right-censored"/"suspended" observations.
This censoring indicator scheme is modeled after the
Surv
function of the survival
package.
$rank. ...
Depending on the argument pp
(either passed as
an argument or taken from options.abrem
), a vector
of class "numeric"
with exact median ranks
($rank.median
) or Benard's approximate median ranks
($rank.benard
).
Jurgen Symynck jusy@openreliability.org
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | ## These code lines all generate the same object ##
Abrem(c(500,1200,900,1300,510))
Abrem(time=c(500,1200,900,1300,510))
Abrem(time=c(500,1200,900,1300,510),event=c(1,1,1,1,1))
Abrem(fail=c(500,1200,900,1300,510))
Abrem(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))
Abrem(da1,label="complete dataset",pch=1)
da1 <- Abrem(da1,label="complete dataset",pch=3,col="orange3")
## Generate a similar dataset, but with suspensions ##
Abrem(time=c(500,1200,900,1300,510),event=c(1,1,1,0,0))
Abrem(data.frame(time=c(500,1200,900,1300,510),event=c(1,1,1,0,0)))
Abrem(fail=c(500,1200,900),susp=c(1300,510))
Abrem(time=c(500,1200,900),susp=c(1300,510))
da3 <- Abrem(fail=c(500,1200,900,1300,510),
event=c(1,1,1,0,0),label="censored dataset",pch=1,col="blue")
## plot datasets ##
plot.abrem(list(da1,da3))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.