Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down on April 23, and its replacement, is already up and running.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: creating a custom monthly date

From   Francesco <>
Subject   st: creating a custom monthly date
Date   Sat, 21 Apr 2012 14:56:57 +0200

Dear Statalist,

I have a little problem about the creation a custom date in Stata 12.

Let me specify what I would like to do : I have a panel dataset with
daily observations (which may contains multiple identical dates for
the same id)
I already know how to obtain the relevant month for each daily date,
by typing -gen month=mofd(daily_date).

However, please do not ask me why, I absolutely need to create a
"custom" month variable that starts 2 days before the end of the
previous month (in terms of working days) and ends 3 days before the
start of the next month... I need a way to do that which I can
reproduce accross different datasets, thus obtaining the same custom
dates (for a merging purpose)...

What do you think?
Could you help me ?

Many thanks
*   For searches and help try:

© Copyright 1996–2015 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index