<>
Mark writes:
Anything conceptually wrong with my commands ?
>>
. sum
Variable | Obs Mean Std. Dev. Min Max
-------------+--------------------------------------------------------
date | 32494 14804.6 105.3298 14640 14973
permno | 32494 65554.46 23142.46 10051 92866
ret | 32494 .0081212 .1509227 -.8353909 3
. reshape wide permno, i(date) j(ret)
ret takes on too many values
r(134);
Yes, there is something conceptually wrong. You have long-format data in which each ret is indexed by firm (permno) and date. You want wide-format data of time series, one per firm. Therefore the 'j' variable is permno, not ret.
reshape wide ret, i(date) j(permno)
would make sense. So would
reshape wide ret, i(permno) j(date)
which would create cross-sections per date in each variable. But ret is what you are trying to reshape, not the index of either of its dimensions.
Kit Baum
[email protected]
*
* 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/