confint.breakpointsfull: Confidence Intervals for Breakpoints

Description Usage Arguments Details Value References See Also Examples

View source: R/breakpoints.R

Description

Computes confidence intervals for breakpoints.

Usage

1
2
3
4
5
6
## S3 method for class 'breakpointsfull'
confint(object, parm = NULL, level = 0.95,
    breaks = NULL, het.reg = TRUE, het.err = TRUE, vcov. = NULL, sandwich = TRUE, ...)
## S3 method for class 'confint.breakpoints'
lines(x, col = 2, angle = 90, length = 0.05,
    code = 3, at = NULL, breakpoints = TRUE, ...)

Arguments

object

an object of class "breakpointsfull" as computed by breakpoints from a formula.

parm

the same as breaks, only one of the two should be specified.

level

the confidence level required.

breaks

an integer specifying the number of breaks to be used. By default the breaks of the minimum BIC partition are used.

het.reg

logical. Should heterogeneous regressors be assumed? If set to FALSE the distribution of the regressors is assumed to be homogeneous over the segments.

het.err

logical. Should heterogeneous errors be assumed? If set to FALSE the distribution of the errors is assumed to be homogeneous over the segments.

vcov.

a function to extract the covariance matrix for the coefficients of a fitted model of class "lm".

sandwich

logical. Is the function vcov. the sandwich estimator or only the middle part?

x

an object of class "confint.breakpoints" as returned by confint.

col, angle, length, code

arguments passed to arrows.

at

position on the y axis, where the confidence arrows should be drawn. By default they are drawn at the bottom of the plot.

breakpoints

logical. If TRUE vertical lines for the breakpoints are drawn.

...

currently not used.

Details

As the breakpoints are integers (observation numbers) the corresponding confidence intervals are also rounded to integers.

The distribution function used for the computation of confidence intervals of breakpoints is given in Bai (1997). The procedure, in particular the usage of heterogeneous regressors and/or errors, is described in more detail in Bai & Perron (2003).

The breakpoints should be computed from a formula with breakpoints, then the confidence intervals for the breakpoints can be derived by confint and these can be visualized by lines. For an example see below.

Value

A matrix containing the breakpoints and their lower and upper confidence boundary for the given level.

References

Bai J. (1997), Estimation of a Change Point in Multiple Regression Models, Review of Economics and Statistics, 79, 551-563.

Bai J., Perron P. (2003), Computation and Analysis of Multiple Structural Change Models, Journal of Applied Econometrics, 18, 1-22.

See Also

breakpoints

Examples

1
2
3
4
5
6
7
8
9
## Nile data with one breakpoint: the annual flows drop in 1898
## because the first Ashwan dam was built
data("Nile")
plot(Nile)

## dating breaks
bp.nile <- breakpoints(Nile ~ 1)
ci.nile <- confint(bp.nile, breaks = 1)
lines(ci.nile)

strucchangeRcpp documentation built on May 26, 2021, 9:06 a.m.