data exercise1; set snowy1; if dpq020=. then depression=.; else if dpq020= 1 then depression=1; else if dpq020=2 then depression=1; else if dpq020=3 then depression=1; else if dpq020=0 then depression=0; else if dpq020=7 then delete; else if dpq030=9 then delete; if PAQ635 =2 then walkbike=0; else if PAQ635=1 then walkbike=1; else if paq635=7 then delete; else if paq635=9 then delete; if paq635=. then delete; if paq605=1 then vigorouswork=0; else if paq605=2 then vigorouswork=1; else if paq605=7 then delete; else if paq605=9 then delete; if paq605=. then delete; if PAQ650 =2 then vigorousrec=0; else if PAQ650=1 then vigorousrec=1; else if PAQ650=7 then delete; else if PAQ650=9 then delete; if PAQ650=. then delete; if paq620=1 then moderatework=0; else if paq620=2 then moderatework=1; else if paq620=7 then delete; else if paq620=9 then delete; if paq620=. then delete; if PAQ665 =2 then moderaterec=0; else if PAQ665=1 then moderaterec=1; else if PAQ665=3 then delete; else if PAQ665=7 then delete; else if PAQ665=9 then delete; if PAQ655=. then delete; if ridageyr <=18 then delete; rename ridageyr=age; run; label Depression="feeling down, depressed, or hopelesss 0:no 1:yes"; Walkbike="do you walk or bicylce to work 0:no 1:yes"; vigorouswork= "vigorous work activity 0:no 1:yes"; vigorousrec= "vigorous recreational activities 0:no 1:yes"; moderatework="moderate work activity 0:no 1:yes"; moderaterec= "moderate recreational activities 0:no 1:yes"; proc contents data= exercise1; run; wondering why when I run this code, for each label statements it is saying: Statement is not valid or it is used out of proper order. (also I am extremely new to SAS/coding in general, first semester student)
... View more