reliability {survival}R Documentation

Reliability data sets

Description

A set of data for simple reliablility analyses, taken from the book by Meeker and Escobar.

Usage

braking
capacitor
 cracks
genfan
ifluid
imotor
turbine
valveSeat

Details

Note

The usage above assumes that the survival package is attached via library(survival) or via another package that depends on survival, e.g., mstate. If not, then either survival::turbine or data(reliability, package="survival") can be used.

References

Meeker and Escobar, Statistical Methods for Reliability Data, 1998.

Examples

survreg(Surv(time, status) ~ temperature + voltage, capacitor)

# Figure 16.7 of Meeker, cumulative replacement of locomotive braking
#  grids
gfit <- survfit(Surv(day1, day2, status) ~ batch, braking, id= locomotive)
plot(gfit, cumhaz=TRUE, col=1:2, xscale=30.5, conf.time= c(6,12,18)*30.5, 
     xlab="Locomotive Age in Months", 
     ylab="Mean cumulative number of replacements")

# Replacement of valve seats.  In this case the cumulative hazard is the 
#  natural target, an estimate of the number of replacements by a given time
#  (known as the cumulative mean function = CMF in relability).
# When two valve seats failed at the same inspection, we need to jitter one
#  of the times, to avoid a (time1, time2) interval of length 0
ties <- which(with(valveSeat, diff(id)==0 & diff(time)==0))  #first of a tie
temp <- valveSeat$time
temp[ties] <- temp[ties] - .1 # jittered time
vdata <- valveSeat
vdata$time1 <- ifelse(!duplicated(vdata$id), 0, c(0, temp[-length(temp)]))
vdata$time2 <- temp
fit2 <- survfit(Surv(time1, time2, status) ~1, vdata, id=id)
## Not run: 
plot(fit2, cumhaz= TRUE, xscale= 365.25, 
      xlab="Years in service", ylab = "Expected number of repairs")

## End(Not run)

[Package survival version 3.8-12 Index]