faultdata: Software fault data

Description Usage Arguments Value Examples

View source: R/dataform_nhpp.R

Description

Function faultdata() creates a list to store the fault data that are used to esiamte model parameters of SRM. This data can represent both fault time and count data.

Usage

1
2
faultdata(time = NULL, fault = NULL, type = NULL, te = NULL,
  data = data.frame())

Arguments

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.

Value

A list with the attribute class='Rsrat.faultdata';

time

A vector for time interval.

fault

A vector for the number of detected faults in intervals.

type

A vector for the indicator whether a fault is detected at the end of intervals.

total

An integer for the number of total faults.

len

An integer for the number of time intervals.

mean

A numeric value for mean fault detection time from data.

max

A numeric value for maximum of fault detection time.

Examples

1
2
3
4
data(tomcat5)
faultdata(time=c(1,1,1,1), fault=c(0,1,0,5))
faultdata(time=c(3,1,7,15,12), te=3)
faultdata(time=time, fault=fault, data=tomcat5.catalina)

okamumu/Rsrat documentation built on Oct. 3, 2018, 2:36 a.m.