Advertisement
Guest User

Untitled

a guest
Dec 1st, 2019
146
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
SAS 0.75 KB | None | 0 0
  1. *1;
  2. data patients;
  3.         infile 'C:\Users\Karolcia\Desktop\pakiety\DaneAnemia.txt' delimiter = '09'x firstobs = 2;
  4.         input YOB Height Weight Sex $ Hemoglobin VitB12 Creatinine City $;
  5.  
  6.         *2;
  7.         if City eq 0 then City =.;
  8.  
  9.         *3;
  10.         if Sex = "F" then Sex = 1;
  11.         if Sex = "M" then Sex = 0;
  12.  
  13.         *4;
  14.         data patients;
  15.         set patients;
  16.         Anemia =.;
  17.  
  18.  
  19.         if Sex = 1 and Hemoglobin lt 12 then Anemia = 1;
  20.         else Anemia = 0;
  21.  
  22.         if Sex = 0 and Hemoglobin lt 14 then Anemia = 1;
  23.         else Anemia = 0;
  24.  
  25.         *5;
  26.        
  27.         Wiek = 2019 - YOB;
  28.  
  29.         *6;
  30.  
  31. proc print data = patients;
  32. run;
  33.  
  34. *7;
  35. proc anova data = patients;
  36. class Wiek;
  37. model Creatinine = Wiek;
  38. run;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement