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]

st: reshape long not recognizing the right j values


From   László Sándor <[email protected]>
To   [email protected]
Subject   st: reshape long not recognizing the right j values
Date   Sat, 27 Jul 2013 19:43:22 -0400

Hi,
I am using Stata/MP 12.1 for Windows for this. I have irregular
variable name endings corresponding to dates close to the last trading
day of months. Thus the spacing of these values is irregular. (There
are also dashes between the composites of dates, but Stata seems to
have no problems with that.)

What I don't understand is that when I ask for -reshape long, i()
j(date)- Stata recognized a subset of the j-values, but was looking
for the wrong ones for others (one day off for some months) and thus
of course it did not reshape all months' values.

E.g. my variables start with ...1999-01-29, ...1999-02-26,
...1999-03-31, and Stata tried to find j-values 19990128, 19990226,
19990332. Of course, it only found the middle one, and did not reshape
the other two.

I do not see the logic in what j-values reshape was looking for --- if
you think about it, date strings in numerical form rarely follow any
nice pattern (no arithmetic series or anything). So why did it
recognize some of the values but were looking for the wrong ones in
other cases?

Sorry I did not found this documented.

Thanks,

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