Reputation: 16099
I'm using the forecast
package.
Suppose d.ts
is a time series. When I use plot(forecast(d.ts))
I get a (very nice) plot of my time series plus a forecasted line and a shaded area representing the uncertainty in the forecast. I want to omit the line (the central estimate). Obviously, I could manually remove the Forecast
column from the forecast(d.ts)
object and plot the remaining columns manually, but I was wondering whether there is a faster method. I can write plot(forecast(d.ts,fan=TRUE))
but that does not omit the line (and the rest of the plot isn't what I want either).
Upvotes: 0
Views: 357
Reputation: 6477
I'm quite certain that you cannot hack the forecast function in a way that the predicted values are not computed, as they are needed in order to build the confidence intervals (something along mean +- sd). But if you just want an easy way of of plotting without the predicted values, you could just set the color of the predicted values line as NA:
library(forecast)
fit <- StructTS(WWWusage,"level")
plot(forecast(fit),fcol=NA)
Upvotes: 2