Statalist The Stata Listserver


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

RE: st: RE: time series plot with shaded bands


From   "MA V" <ma_v@hotmail.com>
To   statalist@hsphsun2.harvard.edu
Subject   RE: st: RE: time series plot with shaded bands
Date   Thu, 29 Mar 2007 18:23:22 +0000

Hi.
Thanks.
Actually, the command you suggested does not work very well for me since it needs a lot of new variables to be generated. Also, what I'm looking for is a shaded band that covers an interval between two dates.
Any other suggestions?

---
The following piece of code allows one to draw specific lines at given dates:

sysuse tsline2, clear
tsset day
tsline calories, tline(28nov2002 25dec2002)

I want to add a shaded band from 28nov2002 to 25dec2002 instead of two individual lines. How can I achieve that?
-----
Best,
MA


From: "Maarten Buis" <M.Buis@fsw.vu.nl>
Reply-To: statalist@hsphsun2.harvard.edu
To: <statalist@hsphsun2.harvard.edu>
Subject: st: RE: time series plot with shaded bands
Date: Thu, 29 Mar 2007 19:20:31 +0200

--- MA V wrote:
> I want to add a shaded band from 28nov2002 to 25dec2002 instead of two
> individual lines. How can I achieve that?

twoway rarea upperbound lowerbound day

> And what if I want to add several
> shaded bands for different time periods?

twoway rarea upperbound1 lowerbound1 day1 || /*
    */ rarea upperbound2 lowerbound2 day2

Where upperbound, upperbound1 upperbound2 lowerbound lowerbound1
lowerbound2 day day1 and day2 are variable names.

Hope this helps,
Maarten


-----------------------------------------
Maarten L. Buis
Department of Social Research Methodology
Vrije Universiteit Amsterdam
Boelelaan 1081
1081 HV Amsterdam
The Netherlands

visiting address:
Buitenveldertselaan 3 (Metropolitan), room Z434

+31 20 5986715

http://home.fsw.vu.nl/m.buis/
-----------------------------------------



*
*   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/
_________________________________________________________________
The average US Credit Score is 675. The cost to see yours: $0 by Experian. http://www.freecreditreport.com/pm/default.aspx?sc=660600&bcd=EMAILFOOTERAVERAGE

*
* 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–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index