Sie sind auf Seite 1von 2

data test; input id sex $y x1 x2 ca$; datalines; 1 M 68.5 155 12 1 2 F 61.2 199 22 2 3 F 63.0 115 29 1 4 M 70.0 205 15 1 5 M 68.

6 170 23 2 6 F 65.1 125 30 2 7 M 72.4 220 28 1 8 F 86.2 187 21 1 9 M 87.9 167 19 1 10 F 75.5 156 24 2 ; run; Proc print data=test; run;

/* Program-1 To find the weight loss height loss data ht_wt; input name $ sex $ age height weight init_ht init_wt ; wt_loss = weight-init_wt; ht_loss= height-init_ht ; datalines; john M 35 176 72 173 75 shiva M 32 175 67 173 69 mary F 30 168 65 162 54 ruby F 32 165 58 158 63 ; run; Proc print data=ht_wt; Run; Proc summary data= ht_wt; var wt_loss ht_loss; output out= min_wt min(wt_loss)= ; output out= min_ht min(ht_loss)=; run; proc print data=min_wt; run; proc print data=ht_wt; run; proc print data=min_ht; run; Title 'GRAPH #1';

*/

proc gchart data=ht_wt; vbar height; run; quit;

Title 'GRAPH # 2'; proc gchart data=ht_wt; hbar height; run; quit; Title 'GRAPH # 3'; proc gchart data=ht_wt; hbar height/midpoints=(180,200); run; quit; proc sort data=ht_wt; by weight; run; proc print data=ht_wt; run;

Das könnte Ihnen auch gefallen