View source: R/Analyses_functions_1.R
sojourn | R Documentation |
Computes the estimated sojourn measure for a time series X(t)
greater or lower than the
constant level A
for the provided time interval or its sub-interval.
sojourn(X, A, N = 10000, level = "greater", subI = NULL, plot = FALSE)
X |
Data frame where the first column is a numeric time sequence |
A |
Constant level as a numeric value. |
N |
Number of steps on the time interval (or time sub-interval) used for computations. Default set to 10000. |
level |
A vector of character strings which specifies which sojourn
measure required for |
subI |
Time sub-interval is a vector, where the lower bound is the first element and the upper bound is the second. Optional: If provided, the estimated sojourn measure for the sub-interval is returned, otherwise the whole time interval is considered. |
plot |
Logical: If |
Estimated sojourn measure.
exc_Area
t <- seq(0, 1, length = 1000)
TS <- data.frame("t" = t,"X(t)" = rnorm(1000))
sojourn(TS, 0.8, level = 'lower',subI = c(0.5, 0.8), plot = TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.