You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When hasOutlier=TRUE Rbeast will plot a wide gray band around the fitted Y values.
How is that interval computed? What does it mean?
I have made three attempts in the example below but can't reproduce the wide interval in the Rbeast plot.
library(Rbeast)
data(Nile)
out <- beast(Nile, season="none", dump.ci=TRUE, hasOutlier=TRUE)
plot(out)
# trend component
plot(out[[7]][13]$Y, type="l", ylim=c(700,1200))
lines(out[[7]][15]$CI[,1], lty=3)
lines(out[[7]][15]$CI[,2], lty=3)
# outlier component
plot(out[[9]][11]$Y, type="l", ylim=c(-200,200))
lines(out[[9]][13]$CI[,1], lty=3)
lines(out[[9]][13]$CI[,2], lty=3)
# no issues here
which(out[[9]][13]$CI[,2] > out[[9]][11]$slp)
which(out[[9]][13]$CI[,1] < out[[9]][11]$slp)
# attempt 1: interval too narrow; ignores outlier uncertainty
plot(as.numeric(Nile), col="gray", ylim=c(400,1400))
lines(out[[7]][13]$Y+out[[9]][11]$Y)
lines(out[[7]][15]$CI[,1]+out[[9]][11]$Y, lty=3)
lines(out[[7]][15]$CI[,2]+out[[9]][11]$Y, lty=3)
# attempt 2: interval too narrow and it's wrong to add CI limits together
plot(as.numeric(Nile), col="gray", ylim=c(400,1400))
lines(out[[7]][13]$Y+out[[9]][11]$Y)
lines(out[[7]][15]$CI[,1]+out[[9]][13]$CI[,1], lty=3)
lines(out[[7]][15]$CI[,2]+out[[9]][13]$CI[,2], lty=3)
# attempt 3: interval too narrow; I'm not sure if outlierSigFactor is relevant
plot(as.numeric(Nile), col="gray", ylim=c(400,1400))
lines(out[[7]][13]$Y+out[[9]][11]$Y)
lines(out[[7]][13]$Y+out[[9]][11]$Y+out[[7]][14]$SD*2.5, lty=3)
lines(out[[7]][13]$Y+out[[9]][11]$Y-out[[7]][14]$SD*2.5, lty=3)
The text was updated successfully, but these errors were encountered:
When hasOutlier=TRUE Rbeast will plot a wide gray band around the fitted Y values.
How is that interval computed? What does it mean?
I have made three attempts in the example below but can't reproduce the wide interval in the Rbeast plot.
The text was updated successfully, but these errors were encountered: