bfast2 / bfast

Breaks For Additive Season and Trend
https://bfast2.github.io
GNU General Public License v2.0
40 stars 15 forks source link

I get a return -NULL after I plot the bfast image #106

Open 44jean opened 1 year ago

44jean commented 1 year ago

hey i got stuck. I want to use the bfast package to detrend my carbon use efficiency time series , but the result of plotting always return 'NULL', is this correct? stl plot works and no red line and 'NULL'

this is my code in Rstudio Yt= ts(ee_chart$Cue,start=2000,frequency=12) fit=stl(Yt,t.window=50,s.window='periodic',robust=T) plot(fit) fit <- bfast(Yt, h=0.15, season="dummy", max.iter = 10) plot(fit)

and this is the result image

image

GreatEmerald commented 1 year ago

Yes, this is correct. The return of NULL is not really necessary and could be removed, but it doesn't really make a difference. Your output is correct, Tt shows the trend after breakpoint detection. In your case, no breakpoints were detected, therefore the trend is a straight line.

44jean commented 1 year ago

thanks a lot!!!!!!