r - Finding slope before and after breakpoint -


i'm using bfast package in r decompose time series. curious if possible extract slope of trend segment before , after breakpoint (until end or breakpoint)?

the example below taken reference manual.

harvest

the code generate here.

require(bfast) require(strucchange) require(sandwich) require(forecast) require(raster) require(sp) fit <- bfast(harvest, season="harmonic", max.iter=2) plot(fit, type="trend") 

the problem result output objects aren't automatic, in other words, can find values between breakpoints , try formulate slope trend values, process time consuming because have manually find start/end breakpoint values , extract every value in between. ideally, want find easier way identify slope of trend (blue line) before , after available breakpoints multiple time series.

any appreciated, thanks.

plot(fit, anova = true) 

would give 'slope , significance values each identified trend segment'.

interestingly, work when specify: type="trend"


Comments

Popular posts from this blog

linux - xterm copying to CLIPBOARD using copy-selection causes automatic updating of CLIPBOARD upon mouse selection -

c++ - qgraphicsview horizontal scrolling always has a vertical delta -