detect_event {edecob}R Documentation

Detect Events

Description

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.

Usage

detect_event(conf_band, detec_lower, detec_upper, min_change_dur)

Arguments

conf_band

A data frame containing the confidence bounds. Ideally the output of conf_band.

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.

Value

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


[Package edecob version 1.2.2 Index]