Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: AW: RE: recode - (1) label and (2) error message r(110)


From   "Grote, Veit Dr." <Veit.Grote@med.uni-muenchen.de>
To   <statalist@hsphsun2.harvard.edu>
Subject   st: AW: RE: recode - (1) label and (2) error message r(110)
Date   Wed, 3 Dec 2003 10:13:27 +0100

The "overlapping" is exactly what I want. This is epsecially usefull when your recoded variable is continuous. Thus I do not have to type, for instance - recode varname min/1=1 1.0001/2=2 - or similar (which might be dangerous). 

However, my problems still exist even after changing the recode to
recode alter_m min/3=1 4/6=2 7/9=3 10/12=4 13/18=5 19/24=6, gen(alter_cat) 
I always get the error 
"__000000 already defined
r(110);"
This line does not work, even after restarting or leaving the - generate - part away. This leaves a very straight forward recode with a strange error code.

Veit Grote

-----Ursprüngliche Nachricht-----
Von: Nick Cox [mailto:n.j.cox@durham.ac.uk]
Gesendet: Dienstag, 2. Dezember 2003 22:41
An: statalist@hsphsun2.harvard.edu
Betreff: st: RE: recode - (1) label and (2) error message r(110)


Grote, Veit Dr.
 
> I am using Stata 8.2 (up to date) and have two problems 
> with - recode -:
> 
> 1. Can I somehow label within - recode - as I have tried below:
> recode alter_j (min/1=1 "0-1 Jahr") (1/4=2 ">1-4 Jahre") 
> (4/10=3 ">4-10 Jahre") (10/16=4 ">10-16 Jahre") ///
> gen(alter_cat2) label(alter_cat2)

I'd try it. But note that your intervals overlap, e.g. 1/4
and 4/10. That's not illegal, but I doubt it's what you 
want. 

> 2. Why do I get the error code "r(110)" after the following 
> - recode -. I have a very regular do-file with -generate-, 
> - replace- and -recode- before this error appears:
> 
> recode alter_m min/3=1 3/6=2 6/9=3 9/12=4 12/18=5 18/24=6, 
> gen(alter_cat) 
> __000000 already defined
> r(110);

I get 

"alter_cat already defined"

if that's the case. Same comment about the intervals.

I'm using -recode- of 16 June. 
 
Nick 
n.j.cox@durham.ac.uk 

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

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