PROC IMPORT OUT= WORK.MIKE
DATAFILE= "C:\Users\Mickael\Documents\examen_blanc_sas.xlsx"
DBMS=EXCEL REPLACE;
RANGE="Feuil1$";
GETNAMES=YES;
MIXED=NO;
SCANTEXT=YES;
USEDATE=YES;
SCANTIME=YES;
RUN;
proc print data=WORK.MIKE(obs=10);
run;
proc univariate data=work.MIKE1;
var salaire;
var anciennet_;
run;
proc univariate data=WORK.MIKE ;
histogram salaire /cfill=skyblue ;
run ;
proc sort data=WORK.MIKE ;
by sexe;
run;
proc univariate data=WORK.MIKE ;
var salaire;
by sexe;
run ;
PROC BOXPLOT DATA=WORK.MIKE ;
PLOT salaire*sexe ;
RUN ;
proc univariate data=WORK.MIKE ;
histogram salaire /cfill=skyblue ;
by sexe;
run ;
PROC BOXPLOT DATA=WORK.MIKE ;
PLOT salaire*sexe ;
RUN ;
proc sort data=WORK.MIKE ;
by qualification;
run;
PROC BOXPLOT DATA=WORK.MIKE ;
PLOT salaire*qualification ;
RUN ;
proc sort data=WORK.MIKE ;
by anciennet_;
run;
PROC BOXPLOT DATA=WORK.MIKE ;
PLOT salaire*anciennet_ ;
RUN ;
proc sort data=WORK.MIKE ;
by turnover;
run;
PROC BOXPLOT DATA=WORK.MIKE ;
PLOT salaire*turnover ;
RUN ;
proc ttest DATA=WORK.MIKE ;
class sexe ;
var salaire ;
run ;
proc sort data=WORK.MIKE ;
by sexe;
run;
DATA Data_fem ;
set WORK.MIKE ;
if sexe = "M" then DELETE ;
RUN ;
PROC UNIVARIATE DATA=Data_fem ;
VAR salaire ;
by sexe;
OUTPUT OUT= data_fem1 N = N_f mean = m_f STD= s_f VAR=var_f ;
run ;
DATA Data_hom ;
set WORK.MIKE ;
if sexe = "F" then DELETE ;
RUN ;
PROC UNIVARIATE DATA=Data_hom ;
VAR salaire ;
by sexe;
OUTPUT OUT= data_hom1 N = N_h mean = m_h STD= s_h VAR=var_h ;
run ;
DATA fem_hom ;
SET data_fem1 ;
SET data_hom1 ;
RUN ;
Data fem_hom ;
SET fem_hom ;
sdem=sqrt((((N_f-1)*(var_f)+(N_h-1)*(var_h)))/(N_f+N_h-2)) ;
sd_D=sdem*sqrt(1/N_f+1/N_h) ;
student=(m_f-m_h)/sd_D ;
run ;
quit ;
proc reg data=WORK.MIKE;
MODEL salaire = qualification turnover;
run;
PROC FREQ data=WORK.MIKE;
TABLES salaire*qualification / chisq;
RUN;