Takes a fitted segmented
object returned by segmented()
and adds
on the current plot the joinpoints of the fitted broken-line relationships.
# S3 method for segmented
points(x, term, interc = TRUE, link = TRUE, rev.sgn=FALSE,
transf=I, .vcov=NULL, .coef=NULL, const=0, v=TRUE, ...)
an object of class segmented
.
the segmented variable of interest. It may be unspecified when there is a single segmented variable.
If TRUE
the computed joinpoints include the model intercept (if it exists).
when TRUE
(default), the fitted joinpoints are plotted on the link scale
when TRUE
, the fitted joinpoints are plotted on the `minus' scale
of the current term
variable. This is useful when a null-constraint
has been set on the last slope.
A possible function to convert the fitted values before plotting.
The full covariance matrix of estimates. If unspecified (i.e. NULL
), the covariance matrix is computed internally by vcov()
.
The regression parameter estimates. If unspecified (i.e. NULL
), it is computed internally by coef(x)
.
A constant to be added (on the y-scale) to the values before transforming and plotting.
logical. If TRUE
, vertical lines at the breakpoints are also drawn.
other graphics parameters to pass on to points()
and segments()
(if v=TRUE
).
We call 'joinpoint' the plane point having as coordinates the breakpoints (on the x scale) and the fitted values of
the segmented relationship at that breakpoints (on the y scale). points.segmented()
simply adds the fitted
joinpoints on the current plot. This could be useful to emphasize the changes of the piecewise linear relationship.
plot.segmented
to plot the fitted segmented lines.
if (FALSE) {
#see examples in ?plot.segmented
}
Run the code above in your browser using DataLab