Superimposing 2 fan charts
Superimposing 2 fan charts
Hi Tom,
Forecasting Methods , 3e , by Makridakis, Wheelwright, and Hyndman (1998, Wiley) p.366, https://estima.com/textbooks/makridakis ... h3p366.rpf, has a fan chart for the model boxjenk(diffs=1,sdiffs=1,ma=1,sma=1,maxl,define=weq) writing, but let's say I specify another ARIMA model & forecast for the same time periods, how would I superimpose 2 fan charts on a single graph.
thanks,
Amarjit
Forecasting Methods , 3e , by Makridakis, Wheelwright, and Hyndman (1998, Wiley) p.366, https://estima.com/textbooks/makridakis ... h3p366.rpf, has a fan chart for the model boxjenk(diffs=1,sdiffs=1,ma=1,sma=1,maxl,define=weq) writing, but let's say I specify another ARIMA model & forecast for the same time periods, how would I superimpose 2 fan charts on a single graph.
thanks,
Amarjit
Re: Superimposing 2 fan charts
You can do STYLE=FAN and OVERLAY=FAN, but it almost certainly won't work since whichever one is done second will paint over the one done first.
Re: Superimposing 2 fan charts
I have specified a different model with much wider fans:
and plotted 3 graphs. The green graph should appear on-top-of the orange graph (the orange fans should be visible, as are both the point forecasts); the 3rd graph being:
Code: Select all
boxjenk(diffs=1,sdiffs=1,ar=4,ma=4,sma=1,maxl,define=weq_M2) writingCode: Select all
graph(footer="Forecasts and Prediction Intervals",$
ovcount=8,overlay=fan,ovsame) 11
# writing 1969:1 1972:12
# wfore_M2 1973:1 1974:12 2
# wfore_M1 1973:1 1974:12 4
# lower95_M2 1973:1 1974:12 3
# lower80_M2 1973:1 1974:12 3
# upper80_M2 1973:1 1974:12 3
# upper95_M2 1973:1 1974:12 3
# lower95_M1 1973:1 1974:12 9
# lower80_M1 1973:1 1974:12 9
# upper80_M1 1973:1 1974:12 9
# upper95_M1 1973:1 1974:12 9
- Attachments
-
- ac_mwhp366.jpg (299.3 KiB) Viewed 26932 times
Re: Superimposing 2 fan charts
That's not how the fan style works. It does various shades of color of the first covered series (evenly scaling down the R, G and B components of the color). You can do two separate fans by using STYLE=FAN and OVERLAY=FAN. However, note that FAN (and BAR and a few others) are "painted" styles---they completely cover all the pixels in a region. Because it makes little sense to do lines and then a paint style, RATS will render the paint style first, then do the lines over that. However, if you do two painted styles, the first is covered by the second---all that would be visible would be any piece that is completely outside the region covered by the second, which won't be anything resembling a "fan".