ODS PDF file="C:\Users\gabriela\M2PRO\an2013\Outils_stats\tt\sorties_examen.pdf" startpage=no; /* EXERCICE 1 */ /* http://www.economagic.com/em-cgi/data.exe/feddal/gnpcw */ /* Produit national brut, entre 1969 et 2009, Etats Unis, en billions de dollars */ data exo1; infile "C:\Users\gabriela\M2PRO\an2013\Outils_stats\tt\T1.txt"; input annee trim prod; t=_N_; run; proc gplot data=exo1; symbol1 color=red interpol=join value=dot; plot prod*t; run; proc arima data=exo1; title "Sorties pour PROC ARIMA "; identify var=prod stationarity=(dickey=6); run; identify var=prod(1) stationarity=(dickey=6); run; estimate q=1; run; estimate p=4; run; estimate p=4 q=1; run; quit; /* EXERCICE 2 */ /* http://lib.stat.cmu.edu/datasets/veteran */ data exo2; infile "C:\Users\gabriela\M2PRO\an2013\Outils_stats\tt\T2bis.txt"; input trait cell survie status score mois age therapie; run; proc logistic data=exo2 descending ; title "Sorties pour PROC LOGISTIC "; class trait cell status therapie; model status=trait cell score mois age therapie; output out=outlog p=prev predprob=(individual crossvalidate); run; proc freq data=outlog; title "Sorties pour PROC FREQ "; table _FROM_*_INTO_; run; PROC lifetest data=exo2 plot=(s); title "Sorties pour PROC LIFETEST "; time survie*status(0); run; proc phreg data=exo2; title "Sorties pour PROC PHREG "; class trait cell status therapie; model survie*status(0)=trait cell score mois age therapie; run; /* EXERCICE 3 */ /* http://lib.stat.cmu.edu/datasets/csb/ */ data exo3; infile "C:\Users\gabriela\M2PRO\an2013\Outils_stats\tt\T3.txt" expandtabs; input site block rep ozone rain faam ppmhrs vwpph biomass diam dma dmb d2ha dwhb dmot; run; proc glm data=exo3; title "Sorties pour PROC GLM "; class site ozone faam ; model biomass=site ozone site*ozone faam; run; proc glm data=exo3; title "Sorties pour PROC GLM "; class site ozone faam ; model biomass=site ozone site*ozone faam(site); run; proc glm data=exo3; title "Sorties pour PROC GLM "; class site ozone faam ; model biomass=site ozone; run; /* EXERCICE 4 */ /* DNase de R */ data exo4; infile "C:\Users\gabriela\M2PRO\an2013\Outils_stats\tt\T4.txt"; input obs rrun conc density; run; proc nlin data=exo4 method=marquardt; title "Sorties pour PROC NLIN "; model density=c/(1+exp((a-log(conc))/b)); parameters a=0 c=3 b=1; output out=sortie p=prev r=residual; run; proc nlmixed data=exo4; title "Sorties pour PROC NLMIXED "; parms a=1.5 c=2.48 b=1.09 s2=0.001 s2b1=1; model density ~ normal(c+d/(1+exp((a-log(conc))/b)),s2); random d ~ normal(0,s2b1) subject=rrun; run; ods pdf close;