faultdata: Software fault data

View source: R/dataform.R

faultdataR Documentation

Software fault data

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

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

faultdata(time=c(1,1,1,1), fault=c(0,1,0,5))
faultdata(time=c(3,1,7,15,12), te=3)
test.data <- data.frame(t=c(1,1,1,1), n=c(0,1,0,5))
faultdata(time=t, fault=n, data=test.data)

okamumu/Rsrat documentation built on Feb. 10, 2024, 11:07 p.m.