Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: st: Removing "." (in string format) from a variable-->new problem "code too long"


From   Michael Stewart <[email protected]>
To   [email protected]
Subject   Re: st: Removing "." (in string format) from a variable-->new problem "code too long"
Date   Wed, 28 Nov 2012 20:17:13 -0500

Hi Adam ,
I  was successfully able to remove the "." but I ran into another
problem.  I am still getting the error "variable contains invalid
codes " . I ran the icd9p check variable, gen(prob) .I got  table
which showed that the " Code too long  " . But when I check the
individual codes  by icd9 lookup , I am getting  a valid description.
I am really  puzzled by this.Do you have any thoughts/ suggestions
thanks
Mike



On Wed, Nov 28, 2012 at 7:35 PM, Adam Olszewski
<[email protected]> wrote:
> replace yourvariable="" if yourvariable=="."
>
> On Wed, Nov 28, 2012 at 7:16 PM, Michael Stewart
> <[email protected]> wrote:
>> hello ,
>>
>> i am working with ICD9 codes and i had to convert the icd-9 codes to
>> string format
>> Unfortunately , I got some values like following with only dots (as
>> shown below).
>>  |--------------|
>>  |   996.51 |
>>  |        .     |
>>  |        .    |
>>  |        .    |
>>  |   327.23 |
>>  |----------   |
>>  |        .    |
>>  |        .    |
>>  |        .    |
>>  |        .    |
>>  |        .    |
>>  |-------------|
>>  |    555.9 |
>>  +----------+
>>
>> As I try to use the icd9 check commnd, I get that the variable has
>> invalid icd9 values and following output
>>
>> . |        .   Invalid placement of period |
>> . |        .   Invalid placement of period |
>>  |        .   Invalid placement of period |
>>  |        .   Invalid placement of period |
>>  |        .   Invalid placement of period |
>> |----------------------------------------|
>>
>> Is there any way to just remove   "." (in string format) from the variable.
>>
>>
>> --
>> Thank you ,
>> Yours Sincerely,
>> Mike.
>> *
>> *   For searches and help try:
>> *   http://www.stata.com/help.cgi?search
>> *   http://www.stata.com/support/faqs/resources/statalist-faq/
>> *   http://www.ats.ucla.edu/stat/stata/
> *
> *   For searches and help try:
> *   http://www.stata.com/help.cgi?search
> *   http://www.stata.com/support/faqs/resources/statalist-faq/
> *   http://www.ats.ucla.edu/stat/stata/



-- 
Thank you ,
Yours Sincerely,
Mike.
*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/faqs/resources/statalist-faq/
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index