detect_event | R Documentation |
Detect events using the confidence bounds. An event is detected if all the
points of the upper or lower bound of the confidence band are below or above
the threshold for min_change_dur
consecutive days.
detect_event(conf_band, detec_lower, detec_upper, min_change_dur)
conf_band |
A data frame containing the confidence bounds. Ideally the output of |
detec_lower |
The lower detection bound in the same units as the values in data. |
detec_upper |
The upper detection bound in the same units as the values in data. |
min_change_dur |
The minimal number of time units that the confidence bounds need to stay inside the detection bounds in order for an event to be detected. Defaults to 84, i.e. 12 weeks. |
A list of four values:
event_detected
gives whether an event was detected
event_onset
gives the time_point at which the event was detected
event_duration
gives the duration the event is sustained
event_stop
gives whether the detected event is censored
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.