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 at the end of May, and its replacement, statalist.org is already up and running.


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

Re: st: How to drop observations according to date?


From   Edward Crawley <edward.crwly@gmail.com>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: How to drop observations according to date?
Date   Fri, 21 Jun 2013 15:02:09 +0100

Thank you very much Nick for your fast and informative reply.

I will do the same from now on and look at the -help- before Googling.

Edward

On Fri, Jun 21, 2013 at 2:53 PM, Nick Cox <njcoxstata@gmail.com> wrote:
> consequence of a display format.
>
> These are monthly dates so
>
> ... if date < ym(2000, 1)
>
> will be one solution.
>
> I find out about functions such as -ym()- not by Googling but by
> looking at the help. I know that there will be functions that yield
> monthly dates as results, which will solve the problem. -help
> functions- is where I start.
>
> The fact is that dates and times are a proverbial pain whatever you
> do; but it's all documented.
>
> Nick
> njcoxstata@gmail.com
>
>
> On 21 June 2013 14:30, Edward Crawley <edward.crwly@gmail.com> wrote:
>> Dear listers,
>>
>> I have a panel dataset and I would like to drop all observations,
>> which are dated before 2000m1. I used -drop if date < 2000m1-, but
>> Stata doesn't understand this command. My date variable is identified
>> as a panel data date via -xtset-.
>>
>> It seems like a very easy question, but I couldn't figure it out and I
>> couldn't find proper solutions on the internet.
>>
>> Appreciate any help,
>>
>> Edward
>> *
>> *   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/
*
*   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–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index