Statalist


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

Re: st: Odd behavior


From   "Eva Poen" <eva.poen@gmail.com>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: Odd behavior
Date   Wed, 28 May 2008 15:41:50 +0100

Steve,

I don't know about -icd9 gen-, but I can define and apply labels in
Stata10 without any problems. I tried your example, and it works here.
Are you sure you didn't make a typo? Like -label dfine dxgroup 14
"Fractures", add- for example? This would trigger the invalid syntax
error that you got.

The example that I tried is listed below.
Eva

****
clear
set obs 25
gen x = _n

label define dxgroup 1  "Symptoms, signs, and ill-defined conditions"
forvalues i = 2/12 {
	label define dxgroup `i'  "Symptoms, signs, and ill-defined conditions", add
}
forvalues i = 13/25 {
	label define dxgroup `i'  "Injury and poisoning", add
}

label values x dxgroup
label list dxgroup
****

2008/5/28 Pitts, Stephen R. (CDC/CCHIS/NCHS) (CTR) <srp3@cdc.gov>:
> Dear Statalisters,
>
> I'm using Stata v 10 on Windows XP Pro, trying to assign labels to about
> 25 groups of diagnostic code ranges, created using the -icd9 gen-
> command in Stata. It works just fine, until I've assigned the first 13
> groups, then I suddenly get the following error. I also get a syntax
> error if I make dxgroup 14 the first label assigned, after removing the
> ", add".
> ____________________
>
> . label define dxgroup 12 "Symptoms, signs, and ill-defined conditions",
> add
>
> . label define dxgroup 13 "Injury and poisoning", add
>
> . label define dxgroup 14 "Fractures", add
> invalid syntax
> r(198);
> __________________
>
> Does anybody know what I've run into here?
>
> Thanks
>
> Steve Pitts
>
>
>
>
>
> *
> *   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