Statalist The Stata Listserver


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

RE: st: RE: Modifying -irf graph- output


From   "Scott Merryman" <[email protected]>
To   <[email protected]>
Subject   RE: st: RE: Modifying -irf graph- output
Date   Fri, 16 Jun 2006 11:50:36 -0500

Below is one way to added individualized subtitles.  Without the -ycommon-
option on the graph combine, the middle subgraph (#5) is not as wide as the
others, though I am not sure why.  

Hope this helps,
Scott


graph drop _all
 irf graph irf, irf(test_irf) individual iname(A) 

local i = 1
foreach l1 in  Log(C) Log(Y) Log(I) {
  foreach l2 in  Log(C) Log(Y) Log(I) {
    	graph disp A`i'
    	if `i' >6 {
    		local ixtitle Years
    		local ixlabel #5
    	}
    	else {
    		local ixlabel ""
    		}

    	graph addplot,  subtitle("Response of `l1' to a `l2' Shock" , /// 
    	 size(small))  legend(order(1 "95% CI" 2 "IRF") ) /// 
	 xlabel(none) xtick(#5) xtitle("`ixtitle'") xlabel(`ixlabel') 
	
    	local gr "`gr' A`i'"
    	local ++i
   }
}

grc1leg `gr', title(My Title) 

or 

grc1leg `gr', title(My Title) ycommon

> -----Original Message-----
> From: [email protected] [mailto:owner-
> [email protected]] On Behalf Of Michael S. Hanson
> Sent: Friday, June 16, 2006 10:24 AM
> To: [email protected]
> Subject: Re: st: RE: Modifying -irf graph- output
> 
>   .
> 
> On Jun 15, 2006, at 6:34 PM, Scott Merryman wrote:
> 
> > Regarding the legend options, a -legend()- option inside the -by()-
> > will
> > alter its position, while a -legend()- option outside the -by()-
> > will alter
> > its contents.  For example:
> >
> > irf graph irf, irf(test_irf) byopts(title(My Title) yrescale ///
> >  xrescale note("") legend(pos(3) )) legend(stack col(1) ///
> >  order(1 "95% CI" 2 "IRF") symx(*.5) size(vsmall))  xtitle("Year")
> 
> 	Thanks:  I don't think I would have figured out to use the two
> separate -legend- options on my own.  Is this documented somewhere
> that I simply missed?
> 
> 
> > Regarding the -xtitle- , are not all the titles the same in such a
> > graph?
> 
> 	-xtitle- might have been a bad choice to illustrate this point.
> Alternatively, one might want to place -xlabel-s on each of the
> subplots, rather than just the final row as the default, for
> example.  Or, more importantly, one might have different units of
> measurement for each of the variables in the (S)VAR, which would
> suggest different -ylabel-s by row.  Such a case would occur in the
> Luktepohl data were an interest rate included in the VAR, for example.
> 
> 
> > To have individualized subtitles, I think you will have to create
> > the graphs
> > individually and then combine them or perform surgery on
> > varirf_graph.ado.
> 
> 	I suspected as much, but was hoping that some non-apparent (to me)
> set of options (such as the -legend- -legend- trick above) or an
> undocumented option might allow more control over the display of
> these subtitles.  Oh well.  Thanks once again for all your insight on
> this issue.
> 
>                                          -- Mike
> 
> 
> *
> *   For searches and help try:
> *   http://www.stata.com/support/faqs/res/findit.html
> *   http://www.stata.com/support/statalist/faq
> *   http://www.ats.ucla.edu/stat/stata/


*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index