| |
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]
Re: st: Inexplicable errors when using -reshape long-
On Feb 18, 2007, at 5:33 AM, Svend Juul wrote:
On Feb 18, 2007, at 4:57 AM, Clive Nicholas wrote:
. reshape long conle98-othle00, i(id) j(year)
no xij variables found
r(111);
. reshape long rsex01 conle98-othle00, i(id) j(year)
no xij variables found
r(111);
You should:
reshape long conle lable ldmle othle , i(id) j(year)
Apart from that: I suspect that you will get a problem with the
years 98,99,00;
You might want to rename:
rename conle00 conle100
to get increasing years.
To reiterate what Svend (and Nick) have suggested: your use of
stubs instead of variable names with -reshape- is the source of the r
(111) error message. However, in my experience Svend's conjecture is
also correct: Stata tends not to recognize the crossing of centuries
with two-digit years. You might consider first renaming your data
series with -renvars-, such as:
renvars *99, postsub(99 1999)
renvars *00, postsub(00 2000)
etc., which will save some time over a series of individual -rename-
commands. IMO, the -test- option on -renvars- is particularly useful
in cases like this one. Hope this helps.
-- Mike
*
* 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/