SMRD:::vinny() library(SMRD)
An overview of the SMRD
package features
An overview of working with life.data
objects
Creating life.data
objects with frame.to.ld()
Viewing and subsetting elements
Plotting life.data
objects
SMRD
Package FeaturesSMRD is designed to easily return estimation/prediction results for many types of failure data
SMRD
facilitates minimal data pre-processing through flexible event definitions
Organizations often use different terms to describe the same event
Many applications use ambiguous numerical codes to represent these events
SMRD
allows for flexible event definitions to utilize the data as-isSMRD
event definitions easily mapped to survival
numeric definitionsThe 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
Many of these data sets still need to be documented
A list of these data sets is returned using data(package = "SMRD")
Likewise, the names and descriptions of the data sets is shown in the table below
DT::datatable(as.data.frame(data(package = 'SMRD')$results[,c(-2)]))
lzbearing
Overview of the data set
DT::datatable(lzbearing, options = list(pageLength = 8))
life.data
object. life.data
objects are created using the function frame.to.ld
.lzbearing.ld <- frame.to.ld(lzbearing, response.column = 1, time.units = "Megacycles")
life.data
has been created, several plots and values can be producedevent.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
Plots
Numerical results
shockabsorber
datasetshockabsorber
SMRD
functions to analyze the shockabsorber dataset used throughout the textshockabsorber
life.data
objectshock.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')))
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")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.