View source: R/mspProcessData.R

mspProcessData | R Documentation |

Generate single- or multi-state observations under normal operating conditions or under fault conditions.

```
mspProcessData(
faults,
period = 7 * 24 * 60,
faultStartIndex = round(0.8433 * period),
startTime = "2015-05-16 10:00:00 CST",
multiState = TRUE,
angles2 = list(yaw = 0, pitch = 90, roll = 30),
scales2 = c(1, 0.5, 2),
angles3 = list(yaw = 90, pitch = 0, roll = -30),
scales3 = c(0.25, 0.1, 0.75),
adpcaTest = FALSE,
msadpcaTest = FALSE,
...
)
```

`faults` |
A character vector of faults chosen. Options are "NOC", "A1", "B1", "C1", "A2", "B2", "C2", "A3", "B3", "C3", or "All". See details for more information. |

`period` |
The observation cycle length. Defaults to one week's worth of minute-level observations (10,080 observations). |

`faultStartIndex` |
An integer specifying the index at which the faults will start. Defaults to roughly 85 percent through the cycle. |

`startTime` |
a POSIXct object specifying the day and time for the starting observation. |

`multiState` |
Should the observations be generated from a multi-state process? Defaults to TRUE. |

`angles2` |
Change the principal angles for State 2. Defaults to yaw = 0, pitch = 90, and roll = 30. |

`scales2` |
Change the principal scales for State 2. Defaults to 1, 0.5, and 2. |

`angles3` |
Change the principal angles for State 3. Defaults to yaw = 90, pitch = 0, and roll = -30. |

`scales3` |
Change the principal scales for State 3. Defaults to 0.25, 0.1, and 0.75. |

`adpcaTest` |
If "multiState" is TRUE, incorrectly label all the states the same. This should only be used to test AD-PCA performance under a true multi-state model. Defaults to FALSE. |

`msadpcaTest` |
If "multiState" is FALSE, incorrectly label all the states at random. This should only be used to test MSAD-PCA performance under a true single-state model. Defaults to FALSE. |

`...` |
Lazy dots for internal arguments |

For details on how the faults are induced, see the "details" of the faultSwitch() function. This function also includes AD-PCA versus MSAD-PCA treatment arm testing. There are four possibilities to test:

- 1.
The true process has one state, and we correctly assume the true process has one state. In this case, AD-PCA and MSAD-PCA are exactly the same. Draw observations from this state by setting the "multiState" argument to FALSE. The "state" label will correctly mark each observation as from the same state.

- 2.
The true process has one state, but we incorrectly assume the true process has multiple states. In this case, AD-PCA should outperform MSAD-PCA in false alarm rates and waiting time to the first alarm. Draw observations from this state by setting the "multiState" argument to FALSE and the "msadpcaTest" argument to TRUE. The "state" label will be contain randomly generated state values (1, 2, and 3 are all equally likely) for each observation.

- 3.
The true process has multiple states, but we incorrectly assume the true process has one single states. In this case, MSAD-PCA should outperform AD-PCA in false alarm rates and waiting time to the first alarm. Draw observations from this state by setting the "multiState" argument to TRUE and the "adpcaTest" argument to TRUE. The "state" label will be identical for each observation.

- 4.
The true process has multiple states, and we correctly assume the true process has multiple states. In this case, MSAD-PCA should outperform AD-PCA in false alarm rates and waiting time to the first alarm. Draw observations from this state by setting the "multiState" argument to TRUE. The "state" label will correctly mark each observation as from the same state.

A list of data frames named with the names of the given faults with the following information:

- dateTime –
A POSIXct column of times starting at the user- defined 'startTime' argument, length given by the 'period' argument, and spacing given by the 'increment' argument. For example, if the starting value is "2016-01-10", period is 10080, and the incrementation is in minutes, then this sequence will be one week's worth of observations recorded every minute from midnight on the tenth of January.

- state –
An integer column of all 1's (when the 'multiState' argument is FALSE), or a column of the state values (1, 2 or 3).

- altState –
If either adpcaTest or msadpcaTest are TRUE, this column will contain incorrect state information used for testing the different treatment arms against their respective controls.

- x –
A double column of generated values for the first feature.

- y –
A double column of generated values for the second feature.

- z –
A double column of generated values for the third feature.

If the user only specifies one fault, then this function will return the single xts matrix, instead of a list of one matrix. For details on how these features are defined, see the "details" of the processNOCdata() function.

Calls: `processNOCdata`

, `faultSwitch`

,
`dataStateSwitch`

. Simulation pipe flow: `mspProcessData`

into `mspTrain`

into `mspMonitor`

into
`mspWarning`

.

```
## Not run: # cut down on R CMD check time
mspProcessData(faults = "All")
## End(Not run)
```

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.