hi Zenghui,
The graphs are made with gle (open source software), see gle-graphics.org.
I first create the data needed in SAS and export it in csv format (googlemtb.dat), to be used as inputs in the gle script.
Gle can export the graph as a pdf, which can then be imported in a word document or Latex. For this to work, you will need to install ‘Ghostscript’, which is somewhat painful (on Windows). It doesn’t seem very stable because I had to reinstall it more than once. On linux, this seems easier/more stable.
The code for ROA is as follows (use d1 and d3 for MTB):
include "graphutil.gle"
size 15 8
sub graph_hairlines
set lstyle 6 just lc
! graph_vline f0
! graph_text f0 15000 label "f_0" dx 0.1
set lstyle 1 color grey
graph_hline 0
end sub
!file contents
!fyear,mtb_google,roa_google,mtb_industry,roa_industry
!2004,17.568434482,0.1204578084,2.3922329523,-0.020013697
set font texcmr
begin graph
xtitle "Firm year"
ytitle "Return on Assets (ROA)"
xticks on
data "googlemtb.dat"
d2 key "Google"
d4 key "Industry (SIC 7370)"
bar d2,d4 fill navy,skyblue
key pos br
under graph_hairlines
end graph
The graphutil.gle file (which is imported) includes some routines, see attached.
best regards,
Joost