Estimates the transition endpoints between two phases.

transition(x, y, ...)

# S4 method for numeric,numeric
transition(x, y, level = 0.95)

# S4 method for PhasesMCMC,missing
transition(x, level = 0.95)

Arguments

x, y

A numeric vector. If y is missing, x must be an PhasesMCMC object.

...

Currently not used.

level

A length-one numeric vector giving the confidence level.

Value

The endpoints of the transition interval for each pair of successive phases (at a given level).

Details

The transition is the shortest interval that satisfies \(P(IntervalInf < Phase1Max < Phase2Min < IntervalSup | M) = level\).

This assumes that the phases are in temporal order constraint.

Methods (by class)

  • transition(x = numeric, y = numeric): Returns a length-two numeric vector (terminal times of the transition interval).

  • transition(x = PhasesMCMC, y = missing): Returns a TimeRange object.

See also

Other time ranges: boundaries(), hiatus()

Author

A. Philippe, M.-A. Vibet, N. Frerebeau

Examples

## Coerce to events
eve <- as_events(mcmc_events, calendar = CE(), iteration = 1)
eve <- eve[1:10000, ]

## Compute min-max range by group
pha <- phases(eve, groups = list(A = c(1, 3), B = c(2, 4)))

## Compute phase ranges
bou <- boundaries(pha)
as.data.frame(bou)
#>       start        end duration
#> A -1046.091  -202.1504 844.9375
#> B -1972.281 -1078.0925 895.1862

## Compute phase transition
tra <- transition(pha)
as.data.frame(tra)
#>        start       end duration
#> B-A -1409.47 -501.6004 908.8674

## Compute phase hiatus
hia <- hiatus(pha)
as.data.frame(hia)
#>         start       end duration
#> B-A -1062.599 -1046.091  17.5059