spgraph different from excel

For questions and discussion related to graphs, reports, and other output, including issues related to presenting or publishing results.
ege_man
Posts: 85
Joined: Sat Jul 07, 2012 2:39 pm

spgraph different from excel

Unread post by ege_man »

Dear Tom,
As you know colorured graphs are not accepted by journals. So I was planing to produce a good-looking time-varying variance-decomposition graph for different horizons. But the graph at h=1 in the first pane is different from excel, there is a problem with the contribution of ip. There is no problem with the other horizons.

The code is below and the data and graph are attached.

Happy new year

Code: Select all

open data 2017_dec_26_oil_stock_vardec.xlsx
calendar(m) 1988
data(format=xlsx,org=columns) 1988:05 2017:03
table

compute [vect[strings]] implabel=|| "poil","rer", "ip", "int", "ret"||
spgraph(hfields=2, vfields=2, header="Variance Decomposition of Stock Returns")
GRAPH(STYLE=stacked,pattern, header= 'h=1', klabel=implabel, key=below, max=1.0, min=0.0) 5
# POIL_VD1
# RER_VD1
# IP_VD1
# RINT_VD1
# RET_VD1
GRAPH(STYLE=STACKED, header= 'h=4', pattern, klabel=implabel, key=below, max=1.0, min=0.0) 5
# POIL_VD4
# RER_VD4
# IP_VD4
# RINT_VD4
# RET_VD4
GRAPH(STYLE=STACKED, header= 'h=6', pattern, klabel=implabel, key=below, max=1.0, min=0.0) 5
# POIL_VD6
# RER_VD6
# IP_VD6
# RINT_VD6
# RET_VD6
GRAPH(STYLE=STACKED, header= 'h=12', pattern, klabel=implabel, key=below, max=1.0, min=0.0) 5
# POIL_VD12
# RER_VD12
# IP_VD12
# RINT_VD12
# RET_VD12
spgraph(done)
Attachments
2017_26_dec_vardec.RGF
graph
(31.18 KiB) Downloaded 951 times
2017_dec_26_oil_stock_vardec.xlsx
data
(116.48 KiB) Downloaded 629 times
TomDoan
Posts: 7814
Joined: Wed Nov 01, 2006 4:36 pm

Re: spgraph different from excel

Unread post by TomDoan »

The problem isn't the contribution of IP---the problem is that the crosshatch pattern used for #5 black and white doesn't have enough room to actually make the crosshatch pattern visible. Redefine the #5 B&W fill as (say) 25% gray (which is a very dark gray, but not black).
ege_man
Posts: 85
Joined: Sat Jul 07, 2012 2:39 pm

Re: spgraph different from excel

Unread post by ege_man »

Dear Tom,
Thanks I looked the introduction pdf and change the degree of gray, but changing pattern or gray do not solve the problem. If you look at the rgf graph file attached you will see that there is no problem with h=4 h=6 and h=12.
Regards
Post Reply