bfast2 / bfast

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

Bfastmonitor/Spatial: rmse extra band #64

Open nephentes7 opened 3 years ago

nephentes7 commented 3 years ago

Is there an easy way to get the RMSE (of the residuals) out, as an extra band (returnLayers) in Bfastmonitor? Many thanks!!!

janverbesselt commented 3 years ago

Hi, thanks for the question. Can you provide a reproducible (simple) example of what you want? rmse of the residuals of the model fit? it can certainly be derived see e.g. this example - and look at the bfastmonitor() code itself - for details - on how the current calculations are done. Try to look at this and see.

library(bfast)
library(zoo)
NDVIb <- as.ts(zoo(som$NDVI.b, som$Time))
plot(NDVIb)
monb <- bfastmonitor(NDVIb, start = c(2010, 13))
monb
bfastmonitor