Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: st: business calendar stata: omitting a month
From
Kreshna Gopal <[email protected]>
To
[email protected]
Subject
Re: st: business calendar stata: omitting a month
Date
Thu, 18 Jul 2013 09:54:05 -0500
Sibel Aydogan <[email protected]> wants to create a business
calendar in which all days of January are omitted. Furthermore, Sibel
wants to know how to omit every day in a specific period.
On 07/17/2013 06:42 AM, Sibel Aydogan wrote:
Dear Statalist,
I’m facing some difficulties with the creation of my business calendar.
I have read the manual of Stata but I cannot find an answer to my questions.
I hope you can help me solve this issue.
I want to delete a whole month: January but I don’t know how I can do this.
How can I omit a whole month?
And how can I omit a certain period p.e. from 1 February till 10 February?
My calendar now looks like this, but I want to omit all days of January too.
version 12
range 24sept2012 17march2013
centerdate 24sept2012
omit dayofweek(Sa Su)
These objectives can be achieved as follows:
1. To omit all days in January, the following line can be added in the
business calendar file:
omit dayofweek (Su Mo Tu We Th Fr Sa) if month(Jan)
However, the above will omit every day of every January. If Sibel wants
to omit January days of a specific year, say 2013, this can be used:
omit dayofweek (Su Mo Tu We Th Fr Sa) if month(Jan) & year(2013)
2. To omit every day in a specific period, say from 01feb2013 to
10feb2013, the following will work as well:
from 01feb2013 to 10feb2013: omit dayofweek (Su Mo Tu We Th Fr Sa)
I hope this helps.
Kreshna Gopal
StataCorp
[email protected]
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/faqs/resources/statalist-faq/
* http://www.ats.ucla.edu/stat/stata/