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: 01/04= month/year and tsset


From   Nick Cox <njcoxstata@gmail.com>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: 01/04= month/year and tsset
Date   Sat, 23 Jun 2012 17:00:29 +0100

Well,

format edate1  %td

is a mistake, as these are monthly data. Should be %tm.

But you should look at the observations for which you get missings, say

edit times if missing(edate1)

to see what is giving you missings.

Nick

On Sat, Jun 23, 2012 at 4:33 PM, sabbas gidarokostas
<sabbasgidarokostas@googlemail.com> wrote:

> I have the following "times" column in my data
>
> times
> 01/04
> 02/04
> 03/04
>
> and so forth.
>
>
> I use
>
> gen edate1 = monthly(times,"M20Y")
>
> format edate1  %td
>
> and I get the message
>
> (3744 missing values generated) out of  9126 obs that I have.
>
> I can not see where my mistake is.

*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   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   |   Site index