Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

breakdates

Breakdates Corresponding to Breakpoints


Description

A generic function for computing the breakdates corresponding to breakpoints (and their confidence intervals).

Usage

breakdates(obj, format.times = FALSE, ...)

Arguments

obj

An object of class "breakpoints", "breakpointsfull" or their confidence intervals as returned by confint.

format.times

logical. If set to TRUE a vector of strings with the formatted breakdates. See details for more information.

...

currently not used.

Details

Breakpoints are the number of observations that are the last in one segment and breakdates are the corresponding points on the underlying time scale. The breakdates can be formatted which enhances readability in particular for quarterly or monthly time series. For example the breakdate 2002.75 of a monthly time series will be formatted to "2002(10)".

Value

A vector or matrix containing the breakdates.

See Also

Examples

## Nile data with one breakpoint: the annual flows drop in 1898
## because the first Ashwan dam was built
data("Nile")
plot(Nile)

bp.nile <- breakpoints(Nile ~ 1)
summary(bp.nile)
plot(bp.nile)

## compute breakdates corresponding to the
## breakpoints of minimum BIC segmentation
breakdates(bp.nile)

## confidence intervals
ci.nile <- confint(bp.nile)
breakdates(ci.nile)
ci.nile

plot(Nile)
lines(ci.nile)

strucchange

Testing, Monitoring, and Dating Structural Changes

v1.5-2
GPL-2 | GPL-3
Authors
Achim Zeileis [aut, cre] (<https://orcid.org/0000-0003-0918-3766>), Friedrich Leisch [aut], Kurt Hornik [aut], Christian Kleiber [aut], Bruce Hansen [ctb], Edgar C. Merkle [ctb]
Initial release
2019-10-12

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.