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)A list of four values:
event_detectedgives whether an event was detected
event_onsetgives the time_point at which the event was detected
event_durationgives the duration the event is sustained
event_stopgives whether the detected event is censored
A data frame containing the confidence bounds. Ideally the output of conf_band.
The lower detection bound in the same units as the values in data.
The upper detection bound in the same units as the values in data.
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.