Learn R Programming

segmented (version 0.2-5)

lines.segmented: Bars for interval estimate of the breakpoints

Description

Draws bars relevant to breakpoint estimates (point estimate and confidence limits) on the current device

Usage

## S3 method for class 'segmented':
lines(x, term, bottom = TRUE, conf.level = 0.95, k = 50, 
    pch = 18, rev.sgn = FALSE, ...)

Arguments

x
an object of class segmented
term
the segmented variable of the breakpoints being drawn. It may be unspecified when there is a single segmented variable
bottom
logical, indicating if the bars should be plotted at the bottom (TRUE) or at the top (FALSE)
conf.level
the confidence level of the confidence intervals for the breakpoints
k
a positive integer regulating the vertical position of the drawn bars. See Details
pch
either an integer specifying a symbol or a single character to be used in plotting the point estimates of the breakpoints. See points
rev.sgn
should the signs of the breakpoint estimates be changed before plotting? see Details
...
further arguments passed to segments

Details

lines.segmented simply draws on the current device the point estimates and relevant confidence limits of the estimated breakpoints from a "segmented" object. The y coordinate where the bars are drawn is computed as usr[3]+h if bottom=TRUE or usr[4]-h when bottom=FALSE, where h=(usr[4]-usr[3])/abs(k) and usr are the extremes of the user coordinates of the plotting region. Therefore for larger values of k the bars are plotted on the edges. The argument rev.sgn allows to change the sign of the breakpoints before plotting. This may be useful when a null-right-slope constraint is set.

See Also

plot.segmented

Examples

Run this code
## See ?plot.segmented

Run the code above in your browser using DataLab