SMRD:::vinny()
library(SMRD)

In This echapter...

An overview of the SMRD package features

An overview of working with life.data objects

SMRD Package Features

SMRD is designed to easily return estimation/prediction results for many types of failure data

SMRD facilitates minimal data pre-processing through flexible event definitions

The table below shows the default SMRD default event definitions

fail <- strsplit(SMRDOptionsDefaults()$SMRD.F,  split = ',')[[1]]
left <- strsplit(SMRDOptionsDefaults()$SMRD.Lc, split = ',')[[1]]
righ <- strsplit(SMRDOptionsDefaults()$SMRD.Rc, split = ',')[[1]]
intv <- strsplit(SMRDOptionsDefaults()$SMRD.Ic, split = ',')[[1]]
lengths <- lapply(X = list(fail,left,righ,intv), 
                  FUN = function(x) length(x))

Length <- max(unlist(lengths))

fails <- c(fail, rep('', Length-length(fail)))
lefts <- c(left, rep('', Length-length(left)))
righs <- c(righ, rep('', Length-length(righ)))
intvs <- c(intv, rep('', Length-length(intv)))
dats <- data.frame(fails,lefts,righs,intvs)
colnames(dats) <- c('Failed', 
                    'Left-censored',
                    'Right-censored',
                    'Interval-censored') 
DT::datatable(dats, options = list(pageLength = 20))

SMRD includes over 100 datasets

DT::datatable(as.data.frame(data(package = 'SMRD')$results[,c(-2)]))

Analyzing the Leiblien-Zelen Data Set lzbearing

Overview of the data set

DT::datatable(lzbearing, options = list(pageLength = 8))
lzbearing.ld <- frame.to.ld(lzbearing, 
                            response.column = 1,
                            time.units = "Megacycles")
event.plot(lzbearing.ld)

summary(lzbearing.ld)

print(lzbearing.ld)

plot(lzbearing.ld, distribution = "lognormal")

Many other plots and numerical results can also be easily returned as shown in the next example

Example: Analyzing the shockabsorber dataset

Dataset: shockabsorber

shockabsorber
shock.ld <- frame.to.ld(frame = shockabsorber,
                        response.column = 1,
                        failure.mode.column = 2,
                        censor.column = 3,
                        time.units = 'Kilometers')
par(mfrow = c(1,2), bg = NA)
plot(shock.ld)
plot(shock.ld, distribution = 'lognormal')
par(mfrow = c(1,2), bg = NA)
mlehazplot(shock.ld,  distribution = 'lognormal', param.loc = 'topleft')
mleprobplot(shock.ld, distribution = 'weibull', param.loc = 'topleft')
simple.contour(shock.ld, 
               distribution = 'sev', 
               threeD = T, 
               original.par = F,
               static = T)
simple.contour(shock.ld, 
               distribution = 'sev',
               show.confidence = F, 
               zoom = 1.75,
               static = T)
(print(mlest(shock.ld, distribution = 'weibull')))

Example: Nelson's Super-Alloy Data Set superalloy

superalloy.ld <- frame.to.ld(superalloy,
                             response.column = 1, 
                             censor.column = 2,
                             x.columns = c(5,6,4),
                             time.units = "Kilocycles")

summary(superalloy.ld)

censored.data.plot(superalloy.ld, 
                   explan.var = 1)

censored.data.plot(superalloy.ld, 
                   explan.var = 3,
                   response.on.yaxis = F)

censored.data.plot(superalloy.ld, 
                   explan.var = 3, 
                   x.axis = "log", 
                   y.axis = "log")

censored.data.plot(superalloy.ld, 
                   explan.var = 3,
                   response.on.yaxis = F, 
                   x.axis = "log", 
                   y.axis = "log")


Auburngrads/SMRD documentation built on Sept. 14, 2020, 2:21 a.m.