Statalist The Stata Listserver


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

Re: st: reshape error


From   David Kantor <kantor.d@att.net>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: reshape error
Date   Mon, 12 Mar 2007 20:26:37 -0400

At 07:12 PM 3/12/2007, Rodrigo Martell wrote:
I have a dataset that looks like this:
SETTLEMENTDATE qld_p nsw_p
1/01/2004 4:30 14.90673 14.67833
1/01/2004 5:00 14.74838 14.58328
1/01/2004 5:30 14.54922 14.6783
1/01/2004 6:00 14.16048 14.59497
1/01/2004 6:30 13.8505 14.69998
1/01/2004 7:00 13.09797 14.6587
1/01/2004 7:30 14.8116 15.92572


I've reshape things like this before using something like

-reshape long _p, i(SETTLEMENTDATE) j(State) string-

However, this command now gives me an error (r(111)), "no xij variables found". Can anyone see what's going wrong?
(settlementdate is stored as a string by the way)

Thanks,

Rodrigo

Rodrigo Martell

<http://www.frontier-economics.com>
Frontier Economics Pty. Ltd.
395 Collins Street
Melbourne VIC 3000
Australia
www.frontier-economics.com
Looks to me that the variables you are attempting to reshape are qld_p nsw_p, which share a common suffix.
-reshape- expects the variables to share a common prefix.

Try renaming them to p_qld and p_nsw; then,...
-reshape long p_, i(SETTLEMENTDATE) j(State) string-

HTH
--David

*
* For searches and help try:
* http://www.stata.com/support/faqs/res/findit.html
* 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   |   What's new   |   Site index