plot.bayesian.vam: Plot the Bayesian estimtions of characteristics of a virtual...

View source: R/plot.R

plot.bayesian.vamR Documentation

Plot the Bayesian estimtions of characteristics of a virtual age model

Description

For bayesian.vam object, plots the Bayesian estimations (mean and 0.95 credibility interval) of the characteristics of a virtual age model for Corrective Maintenance (CM) and planned Preventive Maintenance (PM).

Usage

plot.bayesian.vam(obj,type,from,to,length.out=101,by,system.index=1,cm.type=NA,pm.type=NA,add=FALSE,nb.proposal=500,col=c("blue","black"),lty=c(1,3),lwd=c(1,1),...)

Arguments

obj

an object of class bayesian.vam specifying the virtual age model considered, the prior distribution of the parameters and the data set of observations.

type

specifies which characteristic to plot:

  • "i" or "intensity" for failure intensity,

  • "I" or "cumulative" for cumulative failure intensity also called compensator of the CM-PM process,

  • "v" or "virtual.age" for virtual age,

  • "F" or "conditional.cdf" for conditional distribution function of the next failure time,

  • "S" or "conditional.survival" for conditional survival function of the next failure time,

  • "f" or "conditional.pdf" for conditional probability density function of the next failure time.

  • "d" or "data" for data representation as the CM counting process.

By default, PM times are also represented, but "-pm" can be added at the end of the string type in order to avoid this representation. By default, CM times are also represented (or the cumulative number of CM in the "I" case), but "-cm" can be added at the end of the string "type" in order to avoid this representation. For example, the types "I-pm" and "I-pm-cm" both correspond to the cumulative failure intensity plot, but in the first case the cumulative number of failure will also be plotted.

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, by is defined as (to - from)/(length.out - 1).

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 add==FALSE the characteristic is plotted on a new graphical, otherwise it is added to the current one.

nb.proposal

an optional argument specifying the size of the simulated sample of the posterior distribution (used to compute the estimation and credibility interval of the plotted characteristic).

col

a vector specifying the lines colors corresponding to the mean and the credibility interval.

lty

a vector specifying the lines types corresponding to the mean and the credibility interval.

lwd

a vector specifying the lines width corresponding to the mean and the credibility interval.

...

Further classical graphical parameters specifying the characteristic of the plot. Others non usual arguments can also be added in order to specify the additional representation of the CM and PM times: cm.col, cm.pch, cm.lty, cm.lwd, pm.col, pm.pch, pm.lty, pm.lwd. For PM, those arguments can be vectors in order to specify a specific value of the argument for each PM type.

Details

If the run.bayesian.vam method has already been executed with arguments history=TRUE and nb>=nb.proposal, it is not executed again and the simulated sample of the posterior distribution memorized in obj is used (only the nb.proposal first simulated values are used). Otherwise the run.bayesian.vam method is executed.

Author(s)

R. Drouilhet et L. Doyen

See Also

bayesian.vam to define the Bayesian object. run.bayesian.vam to compute the Bayesian method. summary.bayesian.vam to produce a result summary of the Bayesian method. coef.bayesian.vam to extract the parameters estimation values of the Bayesian method. hist.bayesian.vam for plotting the histogram of the posterior distribution of the parameters.

Examples

simARAInf<-sim.vam(  ~ (ARAInf(.4) | Weibull(.001,2.5)))
simData<-simulate(simARAInf,30)
bayesARAInf <- bayesian.vam(Time & Type ~ (ARAInf(~Unif(0,1)) | Weibull(~Unif(0,1),~Unif(2,4))),data=simData)
run(bayesARAInf,profile.alpha=TRUE,history=TRUE)
plot(bayesARAInf,'i')

rcqls/VAM documentation built on Jan. 14, 2024, 9:07 p.m.