mvfplot | R Documentation |
This function draws a graph of mean value function with data and NHPP classes.
mvfplot(
time = NULL,
fault = NULL,
type = NULL,
te = NULL,
data = data.frame(),
srms = list(),
xlab = "time",
ylab = "# of faults",
datalab = "data",
xmax = NA,
ymax = NA,
colors = mmcolors,
...
)
time |
A numeric vector for time intervals. |
fault |
An integer vector for the number of faults detected in time intervals. The fault detected just at the end of time interal is not counted. |
type |
Either 0 or 1. If 1, a fault is detected just at the end of corresponding time interval. This is used to represent the fault time data. If 0, no fault is detected at the end of interval. |
te |
A numeric value for the time interval from the last fault to the observation time. |
data |
A dataframe. The arguments; time, fault, type, te can also be selected as the columns of dataframe. |
srms |
A list of estimated results. |
xlab |
A character string, indicating the label of x-axis. |
ylab |
A character string, indicating the label of y-axis. |
datalab |
A character string, indicating the label of data in legend. |
xmax |
A numeric value, indicating the maximum value of xlim. If NA, the maximum value is automatically determined. |
ymax |
A numeric value, indicating the maximum value of ylim. If NA, the maximum value is automatically determined. |
colors |
A vector of strings, indicating the colors in plot. |
... |
Other parameters. |
The return value is an object of ggplot2, and thus a line is added like
mvfplot(...) + stat_function(fun=mvf)
.
An object of ggplot.
data(dacs)
result <- fit.srm.nhpp(fault=tohma, srm.names = c("exp", "gamma"),
selection = NULL)
mvfplot(fault=tohma, srms=result)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.