Bookmark and Share

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: RE: data management: looking for the shortest way


From   "PAPANIKOLAOU P." <[email protected]>
To   <[email protected]>
Subject   RE: st: RE: data management: looking for the shortest way
Date   Thu, 24 Oct 2013 10:21:02 +0100

Dear All,
Thank you for emailing me how to translate the YEAR into a LEAP_YEAR
dummy.
 However,  I followed this thru, the FAQs relevant section, and STATA
still is not happy.
Please, see below.

. (mod (YEAR,4) == 0 & mod(YEAR, 100) !=0) | mod(YEAR,400) == 0
unrecognized command:  ( invalid command name
r(199);


Your feedback would be very welcome and much appreciated.
Thank you so much
Panos

-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of Nick Cox
Sent: 24 October 2013 09:27
To: [email protected]
Subject: Re: st: RE: data management: looking for the shortest way

This is an FAQ:

http://www.stata.com/support/faqs/data-management/leap-year-indicators/

The Statalist FAQ itself suggests search of the Stata FAQs.

Note also

http://www.stata.com/support/faqs/resources/statalist-faq/#spell

Nick
[email protected]


On 24 October 2013 09:19, PAPANIKOLAOU P. <[email protected]>
wrote:

> I have a variable YEAR of BIRTH  and want to create a dummy variable 
> taking the value 1 if the individual was born in a LEAP year and 0 
> otherwise.
*
*   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/

*
*   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/


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index