Description Usage Arguments Value Examples
This function allows you to inject windows of oscillating values into a time series. This is meant to mimic a broken sensor that is oscillating between values drawn from a uniform distribution for a specified period of time.
1 |
y |
The time series into which you would like to inject an error. No default. |
n |
The number of error events you would like to inject. Defaults to 1. |
min.dur |
The minimum duration, in time steps, for an error event. A random duration length is chosen to fall between the minimum and maximum (see below) duration event. Defaults to 1. |
max.dur |
The maximum duration, in time steps, for an error event. A random duration length is chosen to fall between the minimum (see above) and maximum duration event. Defaults to 1. |
val.mu |
A random oscillation amplitude is chosen for each error event from a normal distribution. val.mu is the average of that distribution. There is no default value. |
val.sd |
A random oscillation amplitude is chosen for each error event from a normal distribution. val.sd is the standard deviation of that distribution. There is no default value. |
plot |
A logical value (T or F) indicating if a plot should be returned. Defaults to F. |
Returns a list with three components and an optional plot. The three components are the original time series, the new error-injected time series, and a vector of 1 and 0 that indicate the locations (time steps) where errors were injected. The plot is a graphical illustration of these three components.
1 2 3 4 5 6 7 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.