0% found this document useful (0 votes)
79 views2 pages

Weight and Height Loss Analysis

This document contains code to analyze weight and height loss data for four individuals. It inputs the data, calculates weight and height loss, outputs the minimum values, and generates three bar charts - a vertical bar chart of height loss, a horizontal bar chart of height loss, and a horizontal bar chart of height loss for those with initial weights between 180-200. It also sorts the data by weight and prints it.

Uploaded by

Shiva Kumar
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
79 views2 pages

Weight and Height Loss Analysis

This document contains code to analyze weight and height loss data for four individuals. It inputs the data, calculates weight and height loss, outputs the minimum values, and generates three bar charts - a vertical bar chart of height loss, a horizontal bar chart of height loss, and a horizontal bar chart of height loss for those with initial weights between 180-200. It also sorts the data by weight and prints it.

Uploaded by

Shiva Kumar
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

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;

You might also like