draw.history | R Documentation |
Displays breakpoint iteration values for segmented fits.
draw.history(obj, term, ...)
obj |
a segmented fit returned by any "segmented" method. |
term |
a character to mean the ‘segmented’ variable whose breakpoint values throughout iterations have to be displayed. |
... |
graphic parameters to be passed to |
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.
None.
Vito M.R. Muggeo
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
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.