Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 5

libname hayatul 'C:\Users\Ikhram Johari\Desktop\individual project'; run; proc print data=hayatul.bmi; run; /*task1*/ proc univariate data=hayatul.

bmi plots; probplot BMI; run; proc reg data=hayatul.bmi; var BMI; model BMI=REG_ID AGE HT WT PULSE SYS DIAS CHOL /r vif tol; plot r.*p.; run; %let genclass1=Male; proc print data=hayatul.bmi noobs; where GENDER="&genclass1"; title ' The Body Mass Index(BMI) For Male Patients'; run; proc sql; create table BMI as select NAME,GENDER,AGE,BMI, case when BMI gt 30 then 'Obese' when 30 ge BMI ge 25 then 'Overweight' when 25 ge BMI ge 18.5 then 'Normal' else 'Underweight' end as RESULT from hayatul.bmi order by GENDER; quit; proc sql; select NAME,GENDER,AGE,BMI,RESULT from BMI order by GENDER; quit;

/*task2*/ DATA READING; INPUT GROUP $ WORDS @@; DATALINES; X 700 X 850 X 820 X 640 X 920 Y 480 Y 460 Y 500 Y 570 Y 580 Z 500 Z 550 Z 480 Z 600 Z 610 ; PROC PRINT DATA=READING; run; PROC ANOVA DATA=READING; TITLE ANALYSIS OF READING DATA;

CLASS GROUP; MODEL WORDS=GROUP; MEANS GROUP; RUN; DATA RECORD; INPUT RAINING SNOWING SUNNY; DATALINES; 12 15 15 17 12 20 14 13 17 13 14 16 15 17 18 17 16 20 15 13 20 13 18 16 18 15 21 16 17 19 ; PROC PRINT DATA=RECORD; run; PROC ANOVA DATA=RECORD; TITLE 'ANALYSIS OF WETHER CONDITION EFFECT ON PROBLEM SOLVING'; RUN;

/*task3*/ proc print data=hayatul.performance;; run; proc datasets library=hayatul; modify performance; rename COMPANY=NEWCOMPANY; run; proc format; value $nc 'FRA','FRA1'='FUNRA' 'DEA','DEA1'='FUNDEA' 'FTS','FTS1'='FUNFTS' 'TQC','TQC1'='FUNTQC' 'BS','BS1'='FUNBS' 'PS','PS1'='FUNPS' 'SM','SM1'='FUNSM' 'RM','RM1'='FUNRM' 'STSF','STSF1'='FUNSTSF'; run; proc print data=hayatul.performance; format NEWCOMPANY $nc.; run; proc sql; create table perform2 as select *,sum(A_plus ,A,A_minus ,B_plus, B, B_minus, C_plus, C, C_minus, D_plus, D, E, F)as TOTAL from hayatul.performance; quit;

proc sql; create table perform1 as select sum(sum(A_plus) ,sum(A),sum(A_minus) ,sum(B_plus), sum(B), sum(B_minus), sum(C_plus), sum(C), sum(C_minus), sum(D_plus), sum(D), sum(E), sum(F)) as GRANDTOTAL_STAFF from hayatul.performance; quit; proc sql; create table perform3 as select sum(A_plus) as A_Plus_Total, sum(A) as A_Total, sum(calculated A_Plus_Total,calculated A_Total ) as DATA_ANALYSIS from hayatul.performance; quit; proc sql; create table perform4 as select NEWCOMPANY, sum(A_plus ,A ,A_minus ,B_plus ,B ,B_minus ,C_plus ,C)as TOTAL_STAFF from hayatul.performance where TOTAL_STAFF>=100; quit; proc sql; create table perform5 as select NEWCOMPANY, A_plus ,A ,A_minus,sum(A_plus ,A ,A_minus)as TOTAL_PASS_STAFF from hayatul.performance where NEWCOMPANY='IBS' OR NEWCOMPANY='FRA' OR NEWCOMPANY='SM';; quit; proc sql; create table perform6 as select INDUSTRIAL,NEWCOMPANY from hayatul.performance where sum(C_minus,D_plus, D, E,F)>0; quit; proc sql; create table perform7 as select distinct count(NEWCOMPANY) as n from hayatul.performance where INDUSTRIAL='QUANTITATIVE'; quit; proc sql; select * from perform6; quit; proc sql; select * from hayatul.performance where NEWCOMPANY like 'T%'; run;

/*task3. question4*/ data excellence; set hayatul.performance; SUBTOTAL=sum(A_plus,A,A_minus); PERCENT=(SUBTOTAL/777)*100; run; proc print data=excellence; var INDUSTRIAL NEWCOMPANY SUBTOTAL PERCENT; sum SUBTOTAL; run;

/*task4*/ data performance; input educ $ high medium low; datalines; 1 2 0 0 2 0 1 0 3 0 2 0 4 0 0 1 5 0 0 2 6 0 0 1 ; run; proc print data=performance; run; proc freq data=performance; table educ*high*medium*low/crosslist; run;

data score; input Kentucky Syracuse; datalines; 22.2 11.4 12.6 13.2 16.1 12.0 8.2 16.6 19.0 20.1 9.5 14.3 22.3 16.8 11.5 15.4 19.7 14.2 14.3 16.1 ; run; proc print data=score;

run; proc means data = score ; title ' Score Analysis of Each Score '; run; proc ttest data = score ; paired Kentucky*Syracuse; run;

You might also like