Learn R Programming

segmented (version 2.2-1)

plot.stepmented: Plot method for stepmented objects

Description

Takes a fitted stepmented object returned by stepmented() and plots (or adds) the fitted piecewise constant lines for the selected stepmented term.

Usage

# S3 method for stepmented
plot(x, term, add = FALSE, res = TRUE, conf.level=0, interc = TRUE, add.fx = FALSE, 
      psi.lines = TRUE, link=TRUE, const=NULL, res.col=grey(.15, alpha = .4), 
      surf=FALSE, zero.cor=TRUE, heurs=TRUE, shade=FALSE, se.type=c("cdf","abs","none"), 
      k=NULL, .vcov=NULL, leg="topleft", ...)

Arguments

Value

None.

Details

Produces (or adds to the current device) the fitted step-function like relationship between the response and the selected term. If the fitted model includes just a single `stepmented' variable, term may be omitted. If surf=TRUE, and res=TRUE the point widths are proportional to the partial residual values.

See Also

See Also as stepmented

Examples

Run this code

#Following code in stepmented..
if (FALSE) {

par(mfrow=c(1,3))

plot(os,"x")
plot(os,"z")
plot(os,"z", add.fx=TRUE, psi.lines=FALSE ) 
lines(os, "z")

#display the 'surface'
par(mfrow=c(1,3))
plot(os, surf=TRUE, col=1, res.col=2)
plot(os, surf=TRUE, lty=2)
plot(x,z)
plot(os, surf=TRUE, add=TRUE, col=4, res=FALSE)

}

Run the code above in your browser using DataLab