(gH) -_- anas.sas.txt ; TimeStamp (unix) : 01 Avril 2008 vers 10:00 /************************************************************/ /* */ /* quelques ANAlyses Statistiques en Sas */ /* */ /************************************************************/ /* chargement des données et des programmes */ %include 'x:\datagh.sas' ; %include 'x:\statgh.sas' ; /************************************************************/ /* */ /* étude du Dossier PBIO */ /* */ /************************************************************/ title Dossier PBIO ; run ; /* un peu de données (formatées) */ %print10(pbio) ; /* des tris à plat */ proc freq data=pbio ; tables CONNAIT DIFF CONSOM MARQUE CONSVIE SEXE AGE ETATCIVIL NBENFANTS SITPROF CL_REVENU / NOCUM ; /* tris à plat, par fréquence décroissante ; proc freq data=pbio order=freq ; table sexe etatciv age revenu / nocum ; table sexe*etatciv sexe*age sexe*revenu / norow nocol nopercent ; run ; proc freq data=titanic order=freq ; tables CLASS AGE SEX SURV ; */ run ; /************************************************************/ /* */ /* étude du Dossier TITANIC */ /* */ /************************************************************/ title Dossier TITANIC ; run ; /* un peu de données (formatées) */ %print10(titanic) ; /* des tris à plat */ proc freq data=titanic order=freq ; tables CLASS AGE SEX SURV ; run ; /****************************************************************************************************************/ /****************************************************************************************************************/ TITLE Etude de tous les paramètres - 26 mars 97 ; libname f 'z:\A1056' ; options nodate LINESIZE=250 PAGESIZE=5000 NOCENTER FORMDLIM=' ' FORMCHAR='-----------' nonumber ; %include 'x:\statgh.sas' ; * Etude de tous les paramètres - 3 octobre 97 " ; /****************************************************************************************************************/ /****************************************************************************************************************/ /* création de la base à  partir des données issues du fichier Excel de converties en fichier texte (pour faciliter l'utilisation de R */ /*********************************************************/ data f.alltintinana ; infile '1056.sor' firstobs=2 ; input IDEN $ REPL AT URE AH TP AM AE SX NU NS $ NFA VAC LVD $ ; run ; proc contents data=f.alltintinana ; ** proc print data=f.alltintinana ; * listages des valeurs en début et fin de fichier : %titregen(f.alltintinana) ; run ; %tete(f.alltintinana) ; run ; %queue(f.alltintinana) ; run ; title2 ; /****************************************************************************************************************/ /****************************************************************************************************************/ data prepanadse ; set alltintinana; dse = "oui" ; if sce=-1 then dse= "non" ; alrt = "oui" ; if cda=0 then alrt = "non" ; if alrt="non" then grp="ns" ; if alrt="oui" and dse="non" then grp="nc" ; if alrt="oui" and dse="oui" then grp="oa" ; f_iden1 = put(iden,Z4.0) ; /* format zéro pour garantir la concaténation */ f_iden2 = iden ; /* format zéro pour garantir la concaténation */ niden = grp||trim(f_iden) ; /* on utilise retain pour réordonner les variables */ data anadse ; retain niden grp dse alrt cda ; set prepanadse ; proc print data=anadse (firstobs=1 obs=10) ; proc print data=anadse (firstobs=800 obs=825) ; /* on aura besoin de trier par sexe, donc */ proc sort data=anadse out=anadse2 ; by sexe niden ; /* quelques comptages */ title Analyse Globale ; run ; proc freq data=anadse2 order=freq ; table sexe dse alrt grp dse*grp dse*alrt ; /************************************************/ data alltintinana_alrt ; set anadse2 ; length nar $ 30 ; length naj $ 30 ; length nav $ 30 ; length nab $ 30 ; ar = 0 ; aj = 0 ; av = 0 ; ab = 0 ; nar = "" ; naj = "" ; nav = "" ; nab = "" ; /***************************************************************/ if repl <= 1100 then do ; ar = 1 ; nar = trim(nar) || " plq" ; cplq = "Rouge" ; end ; if 1100 < repl and repl <= 70 then do ; aj = 1 ; naj = trim(naj) || " plq" ; cplq = "Jaune" ; end ; /***************************************************************/ alerte = ((ar*10 + aj)*10 + ab)*10 + av ; nar = trim(nar) ; naj = trim(naj) ; nav = trim(nav) ; nab = trim(nab) ; proc print data=alltintinana_alrt (firstobs=1 obs=10) ; proc print data=alltintinana_alrt (firstobs=2728 obs=2738) ; proc freq data=alltintinana_alrt order=freq ; table NMO alerte ar aj ab av CDA LVD nar naj nab nav cplq casat curee cah ctp ca2m cage ; proc freq data=alltintinana_alrt order=freq ; table ar*aj ar*av ar*ab aj*av aj*ab av*ab / norow nocol nopct ; proc means data=alltintinana_alrt n mean stddev cv min max maxdec=2 ; var PLQ ASAT UREE AH TP A2M AGE ; ** proc print data=alltintinana_alrt ; data alltintinana_alrt ; set alltintinana_alrt ; lvdn = input(lvd,4.) ; run ; ** proc contents data= alltintinana_alrt ; data alltintinana_alrt ; set alltintinana_alrt ; dseplq = 0 ; idplq = indexc(lvd,'1') ; if (lvdn>-1) and (idplq>0) then dseplq=1 ; dseasa = 0 ; idasa = indexc(lvd,'2') ; if (lvdn>-1) and (idasa>0) then dseasa=1 ; dseage = 0 ; idage = indexc(lvd,'7') ; if (lvdn>-1) and (idage>0) then dseage=1 ; /**************************************************/ length f_lvd $ 30 ; f_lvd = "???" ; if lvdn=1 then f_lvd = "REPL" ; if lvdn=5 then f_lvd = "TP" ; if lvdn=65 then f_lvd = "A2M TP" ; proc freq data=alltintinana_alrt order=freq ; table dseplq*cplq dseasa*casat dseure*curee dsehya*cah dsetdp*ctp dsea2m*ca2m dseage*cage/ norow nocol nopct ; proc freq data=alltintinana_alrt order=freq ; table dseplq*cplq dseasa*casat dseure*curee dsehya*cah dsetdp*ctp dsea2m*ca2m dseage*cage/ norow nocol nopct ; proc freq data=alltintinana_alrt order=freq ; table lvd f_lvd ; data dsealrt ; set alltintinana_alrt ; if lvd=-1 then delete ; proc freq data=dsealrt order=freq ; table lvd f_lvd ; /************************************************/ data chtmp.re ; * file "f1056.txt" ; array v1 $ id ; set chtmp.bip ; if a2m<10 then a2m = a2m*100 ; exclu = 0 ; alat = -1 ; if sexe=2 then sexe=0 ; format id $7. ; id = 'M'||put(numero,Z5.0) ; format repl 5.1 ; format age 9.4 ; data f ; set c.f ; array v1 $ iden ; iden = 'M'||put(numero,Z5.0) ; drop numero; proc sort data=f out=f_t ; by iden ; proc sort data=resultats out=res_t ; by iden ; data c.c ; merge res_t f_t ; by iden ; ZCDA = put(CDA,Z4.0) ; proc import datafile="Z:\bases7gh.xls" out=c.alls17 dbms=excel replace; data c.ft ; set c.f ; if ft = . then delete ; proc export data=pbh outfile="Z:\sniff17_1056.dbf" dbms=dbf replace; data c.f ; array v1 numero ; /* array force à utiliser les variables dans cet ordre */ array v2 pl ; array v3 as ; array v4 ur ; array v5 hy ; array v6 tp ; array v7 a2 ; array v8 ag ; array v9 se ; set c.p ; /* attention à bien mettre set après array et avant les if */ keep numero pl as ur hy tp am ag sx ; if pl = . then delete ; if as = . then delete ; if ur = . then delete ; if hy = . then delete ; if tp = . then delete ; if a2 = . then delete ; if ag = . then delete ; if se = . then delete ; /* gestion du fichier des rintintins */ data a (rename=(nom=nom1)) ; set b.rintintins ; id1 = id ; proc sort data=a out=at ; by id ; proc print data=at (firstobs=1 obs=5) ; var id nom1 ; proc means data=at n ; var id ; /* gestion du fichier du suivi des rintintins */ data binit (rename=(nom=nom2 num_ro=id qualificatif=qualificatif_id mode_x=mode_x_id)) ; set b.suivi_rintintins ; proc means data=binit n ; var id ; data b ; set binit ; id2 = id ; proc sort data=b out=bt ; by id ; proc print data=bt (firstobs=1 obs=5) ; var id nom2 ; proc means data=bt n ; var id ; /* fusion puis export */ title Fichier 3 ; run ; data ct ; merge at bt ; by id ; proc means data=ct n ; var id ; data c ; set ct ; erreur=0 ; noma =nom1 ; nomb =nom2 ; ida = id1 ; idb = id2 ; if not(nom1=nom2) then erreur=1; if not(ida=idb) then erreur=erreur + 2; drop MODE_EXERCICE_id SPECIALITE_id ZONE_VACANCES TITRE_id ; proc sort data=c out =ptout ; by descending erreur id ; proc sql ; create table tout as select id , titre , nom1 , prenom , qualificatif from ptout ; quit ; data rintintins ; length adresse1 $ 90 ; format adresse1 $90. ; informat adresse1 $90. ; /* gestion du fichier des rintintins */ data a (rename=(nom=nom1)) ; set b.rintintins ; id1 = id ; proc sort data=a out=at ; by id ; proc print data=at (firstobs=1 obs=5) ; var id nom1 ; proc means data=at n ; var id ; /* gestion du fichier du suivi des rintintins */ data binit (rename=(nom=nom2 num_ro=id)) ; set b.suivi_rintintins ; proc means data=binit n ; var id ; data b ; set binit ; id2 = id ; proc sort data=b out=bt ; by id ; proc print data=bt (firstobs=1 obs=5) ; var id nom2 ; proc means data=bt n ; var id ; /* fusion puis export */ title Fichier 3 ; run ; data ct ; merge at bt ; by id ; proc means data=ct n ; var id ; data c ; set ct ; erreur=0 ; noma =nom1 ; nomb =nom2 ; ida = id1 ; idb = id2 ; if not(nom1=nom2) then erreur=1; if not(ida=idb) then erreur=erreur + 2; drop MODE_EXERCICE_id SPECIALITE_id ZONE_VACANCES TITRE_id ; proc sort data=c out =ptout ; by descending erreur id ; data suivi_rintintins ; length nom$ 50 ; informat nom $50. ; format nom $50. ; length r_gion_rintintin $ 50 ; informat r_gion_rintintin $50. ; format r_gion_rintintin $50. ; erreur = 0 ; set b.suivi_rintintins ; if (Premier_calcul =.) then do ; erreur = 1 ; mois = 0 ; annee = 0 ; end ; else do ; mois = month(Premier_calcul) ; annee = year(Premier_calcul) ; end ; if trim(r_gion_rintintin)="---" then erreur = 3 ; if dpt_rintintin=. then erreur = 4 ; if dpt_rintintin<0 then erreur = 5 ; proc means data=suivimt noprint ; output out=s1a1 sum= ; var nouveaux_p prem_r prem_B; data s1b ; array v1 mois ; array v2 annee ; array c $ dsc ; array v3 nouveaux_p ; array v4 prem_r ; array v5 prem_B ; array v6 prem_p ; set s1a1 s1a2 ; drop _TYPE_ _FREQ_ ; prem_p = nouveaux_p - prem_r - prem_B ; if _n_=1 then do ; dsc = "TOTAL" ; mois = month(today()) ; annee = year(today()) ; end ; else dsc = "" ; proc sort data=s1b out=s2b ; by annee mois ; proc export data=calculs_nettoyes outfile="Out/B6_details_calculs.xls" dbms ="excel" replace ; proc sql ; create table calculs_relies as select a.num_ro as num1 , a.id_labo as idl1 , a.id_rintintin as idm1 , a.laboratoire as labo1 , a.rintintin as med1 , b.id as idl2 , b.qualificatif , b.nom from a , b where idl1=idl2 ; quit ; proc sql ; create table calculs_relies as select a.num_ro as num1 , a.id_labo as idl1 , a.id_rintintin as idm1 , a.laboratoire as labo1 , a.rintintin as med1 , c.id as idm2 ,c.nom , c.prenom from a , c where idm1=idm2 ; quit ; data calculs_lies (rename=(num1=num_ro)) ; set calculs_relies ; proc sql ; delete from non_relies where num_ro in (select num_ro from calculs_lies) ; quit ; proc freq data=calc_hors_CHU order=freq ; table base cause mode_exercice ; %macro compteCAUSE(base,onglet) ; data calc2 ; base = "calc2" ; total = 1 ; ao = 0 ; vux = 0 ; atoze = 0 ; set &base ; if trim(cause)= 'Ao' then ao = 1 ; if trim(cause)= 'Vux' then vux = 1 ; if trim(cause)= 'Soz meta' then atoze = 1 ; /* proc print data=calc2 (firstobs=1 obs=10) ; var Date_r_sultat anne_calc mois_calc cause ao vux atoze ; */ proc sort data=calc2 out=calc3 ; by descending annee descending mois ; proc means data=calc3 noprint ; output out=calc4 sum= ; var total vux ao atoze; data aa ; length nom_m $ 50 ; format nom_m $50. ; informat nom_m $50. ; base = "aa" ; set a ; nom_m = trim(rintintin) ; proc sql ; select count(distinct(nom_m)) from bbt ; quit ; /* proc sql ; select distinct(nom_m) , prenom , " BBT" from bbt where nom_m like "MP%" ; quit ; */ proc sql ; create table erreur_nom1 as select aat.nom_m from aat left join bbt on aat.nom_m=bbt.nom_m where bbt.nom_m is null ; quit ; proc print data=erreur_nom1 ; data aat_sansd ; /* sans double */ set aat ; tn = trim(nom_m) ; lng = length(tn) ; if substr(tn,lng,1)="." then delete ; proc sql ; create table cct as select aats.nom_m , cause , date_r_sultat , aats.mode_exercice , bbts.mode_exercice , vux, ao, atoze , mois , annee , base1 , base2 , nom1 , nom2 , region_id from aats, bbts where aats.nom_m = bbts.nom_m ; quit ; data eetv ; set eet ; where vux=1 ; %compteME(eetv,detail_vux) ; data eeta ; set eet ; where ao=1 ; %compteME(eeta,detail_ao) ; data eets ; set eet ; where atoze=1 ; %compteME(eets,detail_atoze) ; %compteOrdo(cct,"") ; data cct1996 ; set cct ; where annee=1996 ; data cct1997 ; set cct ; where annee=1997 ; %compteOrdo(cct1996,"1996") ; %compteOrdo(cct1997,"1997") ; %optionsgh(ls=120) ; /** ################################################################################# */ /** */ /** classification ward de la matrice des distances euclidiennes lignes de VINS */ /** */ /** ################################################################################# */ libname gh 'I:\Sasdata' ; options nofmterr ; options nodate LINESIZE=256 PAGESIZE=50 NOCENTER FORMDLIM=' ' FORMCHAR='-----------' nonumber ; /* chargement des données */ proc print data=gh.vins ; /* matrice euclidienne des distances */ proc distance data=gh.vins out=vins_md method=Euclid ; var interval(_numeric_); id vin ; proc print data=vins_md ; /* classification */ /* method=average outtree=vins_tr nosquare nonorm */ /* comme hclust(vins_md,method="average") en R */ proc cluster data=vins_md method=average outtree=vins_tr nosquare nonorm ; id vin ; proc print data=vins_tr ; proc sort data=vins_tr out=vins_ttr ; by _height_ ; /* donc croissant */ proc print data=vins_ttr ; /* dendrogramme : sauvegarde du graphique en postscript */ goptions reset=all gaccess='sasgastd > vinsclsas.ps' device=pscolor ; proc tree data=vins_tr horizontal ; height _height_ ; id vin ; title Classification vins ; quit ; /* reprise des options par défaut */ goptions reset=goptions; run ; /** ################################################################################# */ /** */ /** affichage de l'age pour ELF avec des couleurs différentes pour chaque sexe */ /** */ /** ################################################################################# */ /* TimeStamp (dos) : 06 Septembre 06 13:46 ; z:\essai.sas */ options nofmterr ; libname gh 'I:\Sasdata' ; * proc contents data=gh.elf ; * proc print data=gh.elf ; proc sort data=gh.elf out=elf2 ; by age ; data elf3 ; set elf2 ; idn= _n_ ; if sexe=0 then do ; ageh = age ; agef = . ; end ; else do ; ageh = . ; agef = age ; end ; proc print data=elf3 (obs=10) ; symbol1 c=blue v=dot ; symbol2 c=red v=dot ; proc gplot data=elf3 ; plot ageh*idn agef*idn / overlay ; run ; /** ################################################################################# */ /** */ /** classification issue d'une AFC */ /** */ /** ################################################################################# */ PROC CORRESP DATA=nomtab1 DIM=3 OUT=toto NOPRINT ; VAR cac dj ftm can net ; ID ident ; PROC CLUSTER METHOD=CENTROID ; VAR DIM1-DIM3; ID ident; PROC TREE ; RUN ; /** ################################################################################# */ /** */ /** comparaison des proc clasiques avec les macros gh */ /** */ /** ################################################################################# */ /* lecture des données */ data consom77 ; infile 'z:\consom77.dar' firstobs=2; input Temps $ Resm Depc ; run ; %titregen(consom77) ; /* étude avec les proc classiques */ proc contents data=consom77 ; proc means data=consom77 ; proc corr data=consom77 ; proc reg data=consom77 ; model depc = resm ; /* étude avec les macros gh et dl */ titregen(consom77) ; combien(consom77) ; decritQT(consom77,resm,"mDollars") ; decritQT(consom77,depc,"mDollars") ; asgQT(consom77,depc,"mDollars") ; regrlin(consom77,resm,depc,"mDollars","mDolars") ; run ; /** ####################################### */ /* sortie en fichier texte */ data _null_; set demo ; file "demo.sor" notitles noprint; put id $5. plaq 6.0 asat 6.0 uree 7.2 ah 7.0 tp 6.0 a2m 8.0 age 9.4 sexefm 5.0 exclu 5.0 alat 6.0 ; run ; /* comparaison de courbes Roc */ proc import datafile='art_sniff14.xls' dbms=excel out=art_sniff14 replace ; proc means data=art_sniff14 ; var SNIFF8 Prediction_1 ; proc freq data=art_sniff14 ; table fcs ; %include 'x:\statgh.sas' ; %include 'x:\roc.sas' ; %include 'x:\rocplot.sas' ; %comp2roc(art_sniff14,fcs,SNIFF8,Prediction_1) ; /* comparaison de cohortes */ libname chu 'c:\Temp' ; options nodate LINESIZE=256 PAGESIZE=50 NOCENTER FORMDLIM=' ' FORMCHAR='-----------' nonumber ; %include 'x:\roc.sas' ; proc import datafile='cohorte1.xls' dbms=excel out=chu.cohorte1 replace ; proc import datafile='cohorte2.xls' dbms=excel out=chu.cohorte2 replace ; proc import datafile='cohortes1et2.xls' dbms=excel out=chu.cohortes1et2 replace ; /* en ligne 162 pas de FCS ? */ data cohorte1 ; set chu.cohorte1 ; if fcs=. then delete ; data chu.cohorte1 ; set cohorte1 ; data cohortes1et2 ; set chu.cohortes1et2 ; if fcs=. then delete ; data chu.cohortes1et2 ; set cohortes1et2 ; /* calculs de base */ title Description de la cohorte 1 ; proc means data=chu.cohorte1 n mean stddev cv min max maxdec=4 ; var SNIFF8 FIBTEST APRI HEPASCOR FIB4 MODEL15 ; proc freq data=chu.cohorte1 order=freq ; table fcs ; run ; title Description de la cohorte 2 ; proc means data=chu.cohorte2 n mean stddev cv min max maxdec=4 ; var SNIFF8 FIBTEST APRI HEPASCOR FIB4 MODEL15 ; proc freq data=chu.cohorte2 order=freq ; table fcs ; run ; title Description de la cohortes 1&2 ; proc means data=chu.cohortes1et2 n mean stddev cv min max maxdec=4 ; var SNIFF8 FIBTEST APRI HEPASCOR FIB4 MODEL15 ; proc freq data=chu.cohortes1et2 order=freq ; table fcs ; run ; /* comparaisons d'AUROCS série 1 */ title Delong sur les 6 tests : cohorte 1 ; * proc print data=chu.cohorte1 ; %roc(data=chu.cohorte1,var=SNIFF8 FIBTEST APRI HEPASCOR FIB4 MODEL15,response=FCS, details=YES) ; run ; title Delong sur les 6 tests : cohorte 2 ; * proc print data=chu.cohorte2 ; %roc(data=chu.cohorte2,var=SNIFF8 FIBTEST APRI HEPASCOR FIB4 MODEL15,response=FCS, details=YES) ; run ; title Delong sur les 6 tests : cohortes 1 et 2 ; * proc print data=chu.cohortes1et2 ; %roc(data=chu.cohortes1et2,var=SNIFF8 FIBTEST APRI HEPASCOR FIB4 MODEL15,response=FCS, details=YES) ; run ; /* comparaisons d'AUROCS série 2 */ title Delong sur 2 tests : cohorte 1 ; * proc print data=chu.cohorte1 ; %roc(data=chu.cohorte1,var=SNIFF8 MODEL15,response=FCS, details=YES) ; run ; title Delong sur 2 tests : cohorte 2 ; * proc print data=chu.cohorte2 ; %roc(data=chu.cohorte2,var=SNIFF8 MODEL15,response=FCS, details=YES) ; run ; title Delong sur 2 tests : cohortes 1 et 2 ; * proc print data=chu.cohortes1et2 ; %roc(data=chu.cohortes1et2,var=SNIFF8 MODEL15,response=FCS, details=YES) ; run ; /* conversion en variables qualitatives */ libname tmp 'c:\temp' ; * proc import datafile='rch2.xls' dbms=excel out=tmp.rch2 replace ; * proc contents data=tmp.rch2 ; /* ==> fichier rch2.sor */ data rch2 ; set tmp.rch2 ; array v1 numero ; array v2 metaf ; array v3 plaq ; array v4 asat ; array v5 ur_e ; array v6 hyalu ; array v7 tp ; array v8 a2m ; array v9 age ; * array v10 sexe ; if numero = . then delete ; if metaf = . then delete ; if plaq = . then delete ; if asat = . then delete ; if ur_e = . then delete ; if hyalu = . then delete ; if tp = . then delete ; if a2m = . then delete ; if age = . then delete ; if sexe = . then delete ; keep numero metaf plaq asat ur_e hyalu tp a2m age ; if (plaq<170) or (plaq>390) then do ; plaq = 1 ; end ; else do ; plaq = 0 ; end ; if (asat<10) or (asat>110) then do ; asat = 1 ; end ; else do ; asat = 0 ; end ; if (ur_e<1.9) or (ur_e>8.8) then do ; ur_e = 1 ; end ; else do ; ur_e = 0 ; end ; if (hyalu<2) or (hyalu>73) then do ; hyalu = 1 ; end ; else do ; hyalu = 0 ; end ; if (tp<88) or (tp>121) then do ; tp = 1 ; end ; else do ; tp = 0 ; end ; if (a2m<105) or (a2m>311) then do ; a2m = 1 ; end ; else do ; a2m = 0 ; end ; if (age<29) or (age>66) then do ; age = 1 ; end ; else do ; age = 0 ; end ; proc print data=rch2 ; /******************************************************************/ libname chu 'c:\Temp' ; options nodate LINESIZE=256 PAGESIZE=50 NOCENTER FORMDLIM=' ' FORMCHAR='-----------' nonumber ; %include 'x:\roc.sas' ; /* proc import datafile='cohorte1.xls' dbms=excel out=chu.cohorte1 replace ; proc import datafile='cohorte2.xls' dbms=excel out=chu.cohorte2 replace ; proc import datafile='cohortes1et2.xls' dbms=excel out=chu.cohortes1et2 replace ; */ /* en ligne 162 pas de FCS ? */ data cohorte1 ; set chu.cohorte1 ; if fcs=. then delete ; data chu.cohorte1 ; set cohorte1 ; data cohortes1et2 ; set chu.cohortes1et2 ; if fcs=. then delete ; data chu.cohortes1et2 ; set cohortes1et2 ; /* calculs de base */ title Description de la cohorte 1 ; proc means data=chu.cohorte1 n mean stddev cv min max maxdec=4 ; var SNIFF8 FIBTEST APRI HEPASCOR FIB4 MODEL15 ; proc freq data=chu.cohorte1 order=freq ; table fcs ; run ; title Description de la cohorte 2 ; proc means data=chu.cohorte2 n mean stddev cv min max maxdec=4 ; var SNIFF8 FIBTEST APRI HEPASCOR FIB4 MODEL15 ; proc freq data=chu.cohorte2 order=freq ; table fcs ; run ; title Description de la cohortes 1&2 ; proc means data=chu.cohortes1et2 n mean stddev cv min max maxdec=4 ; var SNIFF8 FIBTEST APRI HEPASCOR FIB4 MODEL15 ; proc freq data=chu.cohortes1et2 order=freq ; table fcs ; run ; /* comparaisons d'AUROCS série 1 */ title Delong sur les 6 tests : cohorte 1 ; * proc print data=chu.cohorte1 ; %roc(data=chu.cohorte1,var=SNIFF8 FIBTEST APRI HEPASCOR FIB4 MODEL15,response=FCS, details=YES) ; run ; title Delong sur les 6 tests : cohorte 2 ; * proc print data=chu.cohorte2 ; %roc(data=chu.cohorte2,var=SNIFF8 FIBTEST APRI HEPASCOR FIB4 MODEL15,response=FCS, details=YES) ; run ; title Delong sur les 6 tests : cohortes 1 et 2 ; * proc print data=chu.cohortes1et2 ; %roc(data=chu.cohortes1et2,var=SNIFF8 FIBTEST APRI HEPASCOR FIB4 MODEL15,response=FCS, details=YES) ; run ; /* comparaisons d'AUROCS série 2 */ title Delong sur 2 tests : cohorte 1 ; * proc print data=chu.cohorte1 ; %roc(data=chu.cohorte1,var=SNIFF8 MODEL15,response=FCS, details=YES) ; run ; title Delong sur 2 tests : cohorte 2 ; * proc print data=chu.cohorte2 ; %roc(data=chu.cohorte2,var=SNIFF8 MODEL15,response=FCS, details=YES) ; run ; title Delong sur 2 tests : cohortes 1 et 2 ; * proc print data=chu.cohortes1et2 ; %roc(data=chu.cohortes1et2,var=SNIFF8 MODEL15,response=FCS, details=YES) ; run ; %allcompRoc2a2(chu.cohortes1et2,SNIFF8 FIBTEST APRI HEPASCOR FIB4 MODEL15,FCS) ; /* TimeStamp (dos) : 31 Mai 08 21:15 ; coefficients de lin */ proc import datafile='pd150.xls' dbms=excel out=pd150 replace ; proc import datafile='md150.xls' dbms=excel out=md150 replace ; proc contents data=pd150 ; proc contents data=md150 ; /* variables à traiter : x CSI CSII PD */ %include 'X:\mccc.sas' ; /* concordance de lin */ %*mccc(md150,x,ratervars=CSI CSII,alpha=0.005) ; %include 'x:\concreg.sas' ; %concreg(md150,CSI,CSII) ; %concreg(md150,CSI,PD) ; %concreg(md150,CSII,PD) ; %concreg(pd150,CSI,CSII) ; %concreg(pd150,CSI,PD) ; %concreg(pd150,CSII,PD) ;