f



Re: newbie question re:reading in and recoding SAS dataset

Jan,

I agree with Toby that you have a problem with the variable brainmt.  It
is commented out of your first else statement, but still exists in the
initial if statement.

A second potential problem seems to exist in the first else statement.
While you indicate that you want case to be equal to one for anyone who
had some kind of subsequent cancer, your code only counts them if they
have had every type of cancer (except for the missing commented out
brainmt.

Might you have meant to code:

>300      else if cancer =1 and (any_skin=1 or any_meln=1 or anymouth=1
>or any_lung=1 or
>300! anybowel=1
>301      or any_stom=1 or any_panc=1 or anyliver=1 or anylymph=1 or
>any_leuk=1 or any_mm=1
>301!  or
>302      any_kidn=1 or any_blad=1 or anybreas=1 or anyutern=1 or
>any_test=1 or anyovary=1
>302! or
>303      anyprost=1 or anyother=1 or /*brainmt=1 or */ unclr_mb=1 or
>unclr_mt=1 or
>303! unclr_st=1 or
>304      anycerv=1 or anycolo=1 or anyrect=1 or anythyr=1 or
>anyesoph=1 or brain_mb=1 or
>304! anyutoth=1)
>305      then case =1;

Finally, you are not assigning any value to case if Cancer is missing, but
that may be by design.

Art
---------
On Thu, 22 Sep 2005 09:47:27 -0700, J McClure <mc006@PACBELL.NET> wrote:

>Hi,
>I am a doctoral student in epidemiology. I have no support at school for
>SAS programming and would greatly appreciate help creating a new
>variable from my dataset. (The SAS programming skills are not part of
>the assignment)
0
art297 (4213)
9/22/2005 9:51:27 PM
comp.soft-sys.sas 142827 articles. 4 followers. Post Follow

0 Replies
603 Views

Similar Articles

[PageSpeed] 24

Reply: