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

data(reliability, package="survival")

Details

References

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

Examples

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

# 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.7-0 Index]