ODS PDF file="C:\Users\Gabriela\M2PRO\Outils_stat\exam.pdf" startpage=no; /*************** EXERCICE 1 *********************/ data exo1; infile "C:\Users\Gabriela\M2PRO\Outils_stat\exam_series.txt"; input Y; run; proc arima data=exo1; identify var=Y stationarity=(dickey=6); run; identify var=Y(1) stationarity=(dickey=6); run; estimate p=4; run; forecast lead=2; run; identify var=Y(1,4) stationarity=(dickey=6); run; estimate p=3; run; forecast lead=2; run; quit; /* ********************* EXERCICE 2 ************************ */ data exo2; infile "C:\Users\Gabriela\M2PRO\Outils_stat\exam_censure.txt"; input id1 id2 age sex $ dxyr pcdx$ futime death alb creat hgb mspike; run; proc logistic data=exo2 descending ; class sex; model death=age sex alb creat hgb mspike; output out=outlog p=prev predprob=(individual crossvalidate); run; proc freq data=outlog; table _FROM_*_INTO_; run; PROC lifetest data=exo2 plot=(s); time futime*death(0); run; proc phreg data=exo2; class sex; model futime*death(0)=age sex alb creat hgb mspike; run; /* ********************* EXERCICE 3 ************************ */ data exo3; infile "C:\Users\Gabriela\M2PRO\Outils_stat\shock.txt" firstobs=2 expandtabs; input id age ht sex survive shock sbp map hr dbp mcvp bsi ci at mct uo pvi rci hg hct recor; run; proc mixed data=exo3; class sex shock; model pvi=age hg shock hct ; random shock / g subject=id ; run; ods pdf close;