plot.model.vam | R Documentation |
plot
plots characteristics of a virtual age model for Corrective Maintenance (CM) and planned Preventive Maintenance (PM).
## S3 method for class 'model.vam'
plot(obj, type, from, to, length.out=101, by, system.index=1 ,cm.type=NA, pm.type=NA, add=FALSE, ....)
## S3 method for class 'sim.vam'
plot(obj, type, from, to, length.out=101, by, system.index=1 ,cm.type=NA, pm.type=NA, add=FALSE, ....)
## S3 method for class 'mle.vam'
plot(obj, type, from, to, length.out=101, by, system.index=1 ,cm.type=NA, pm.type=NA, add=FALSE, ....)
obj |
an object of class |
type |
specifies which characteristic to plot:
By default, PM times are also represented, but "-pm" can be added at the end of the string |
from, to |
optional arguments specifying the range time over which the characteristic will be plotted. |
by |
time increment between two successive maintenance time at which the characteristic will be plotted. |
length.out |
When provided, |
system.index |
the index of the system for which to plot the characteristic. |
cm.type |
how to additionally represent the CM times or the cumulative number of CM in the "I" case. Possible types are "p" for points and "l" for lines. |
pm.type |
how to additionally represent the PM times. Possible types are "p" for points and "l" for lines. |
add |
if |
... |
Further classical graphical parameters specifying how the plot of the characteristic. Others non usual arguments can also be added in order to specify the additional representation of the CM and PM times: |
L. Doyen and R. Drouilhet
simARAInf<-sim.vam( ~ (ARAInf(.4) | Weibull(.05,2.5)))
simData<-simulate(simARAInf,10,nb.system=50,as.list=TRUE)
plot(simARAInf,'i',system.index=2)
mleARAInf <- mle.vam(Time & Type ~ (ARAInf(0.5) | Weibull(1,3)),data=simData)
run.mle.vam(mleARAInf)
plot(mleARAInf,'i-cm',col='blue',add=TRUE,system.index=2)
simCMPM<-sim.vam( ~ (ARAInf(.3) | Weibull(.001,2.5)) & (ARAInf(.6)+ARAInf(-.2) | Periodic(12,prob=c(0.6,0.4))))
(simData<-simulate(simCMPM,50))
plot(simCMPM,'I',from=simData$Time[10],to=simData$Time[40],col='darkblue',xlab='t',ylim=c(0,sum(simData$Type[1:40]==-1)),cm.col='red',pm.type='p',pm.pch=c(1,2),pm.col=c("green","black"),main="Fantastic!")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.