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

points.segmented

Points method for segmented objects


Description

Takes a fitted segmented object returned by segmented() and adds on the current plot the joinpoints of the fitted broken-line relationships.

Usage

## S3 method for class 'segmented'
points(x, term, interc = TRUE, link = TRUE, rev.sgn=FALSE, 
    transf=I, .vcov=NULL, .coef=NULL, ...)

Arguments

x

an object of class segmented.

term

the segmented variable of interest. It may be unspecified when there is a single segmented variable.

interc

If TRUE the computed joinpoints include the model intercept (if it exists).

link

when TRUE (default), the fitted joinpoints are plotted on the link scale

rev.sgn

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.

transf

A possible function to convert the fitted values before plotting.

.vcov

The full covariance matrix of estimates. If unspecified (i.e. NULL), the covariance matrix is computed internally by vcov().

.coef

The regression parameter estimates. If unspecified (i.e. NULL), it is computed internally by coef(x).

...

other graphics parameters to pass on to points() function.

Details

We call 'joinpoint' the plane point having as coordinates the breakpoint (on the x scale) and the fitted value of the segmented relationship at that breakpoint (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.

See Also

plot.segmented to plot the fitted segmented lines.

Examples

## Not run: 
#see examples in ?plot.segmented

## End(Not run)

segmented

Regression Models with Break-Points / Change-Points Estimation

v1.3-4
GPL
Authors
Vito M. R. Muggeo [aut, cre] (<https://orcid.org/0000-0002-3386-4054>)
Initial release
2021-04-28

We don't support your browser anymore

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