Learn R Programming

segmented (version 2.2-2)

draw.history: History for the breakpoint estimates

Description

Displays breakpoint iteration values for segmented fits.

Usage

draw.history(obj, term, ...)

Arguments

Value

None.

Details

For a given term in a segmented fit, draw.history() produces two plots. On the left panel it displays the different breakpoint values obtained during the estimating process, since the starting values up to the final ones, while on the right panel the objective values at different iterations. When bootstrap restarting is employed, draw.history() produces two plots, the values of objective function and the number of distinct solutions against the bootstrap replicates.

Examples

Run this code
data(stagnant)
os<-segmented(lm(y~x,data=stagnant),seg.Z=~x,psi=-.8)
# draw.history(os) #diagnostics with boot restarting

os<-segmented(lm(y~x,data=stagnant),seg.Z=~x,psi=-.8, control=seg.control(n.boot=0))
# draw.history(os) #diagnostics without boot restarting

Run the code above in your browser using DataLab