Phase Duration

duration(x, y, ...)

# S4 method for numeric,numeric
duration(x, y)

# S4 method for PhasesMCMC,missing
duration(x)

Arguments

x, y

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

...

Currently not used.

See also

Other phase tools: phases()

Author

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

Examples

## Coerce to phases
pha <- as_phases(mcmc_phases, start = c(1, 3), calendar = CE(), iteration = 1)

## Compute phase duration
dur <- duration(pha)
summary(dur)
#>    mad mean  sd min  q1 median  q3  max start end
#> P1 278  253 138   1 151    249 345  880     1 487
#> P2 561  551 132   5 464    552 639 1157   297 806