24.04.2014 Views

Pratique de Sas Windows ...9.3 Volume 2 - Ined

Pratique de Sas Windows ...9.3 Volume 2 - Ined

Pratique de Sas Windows ...9.3 Volume 2 - Ined

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

3.6.9 Produire un forest plot avec l’odds ratios par une proc Sgplot<br />

Pour clore ce parcours et retomber sur nos pattes (statistiques), je présente ici une autre ressource <strong>Sas</strong> :<br />

la FAQ stat dont j’extrais l’article Odds Ratios, qui montre … qu’il y en a partout !<br />

Odds Ratios<br />

Mo<strong>de</strong>l-based methods: By <strong>de</strong>fault, <strong>Sas</strong>/STAT PROC LOGISTIC produces odds ratio point estimates and confi<strong>de</strong>nce intervals<br />

(CLODDS= to select Wald or profile likelihood intervals) for predictors not involved in interactions. Beginning in <strong>Sas</strong> 9.2, the<br />

ODDSRATIO statement provi<strong>de</strong>s estimates and confi<strong>de</strong>nce intervals even when predictors are involved in interactions. The<br />

ODDSRATIO option, along with the DIFF= or SLICEDIFF= option, in the LSMEANS statement of PROC GLIMMIX<br />

provi<strong>de</strong>s point estimates (add CL option for confi<strong>de</strong>nce intervals). Custom odds ratios can be computed in the <strong>Sas</strong>/STAT<br />

procedures CATMOD, LOGISTIC, GENMOD, GLIMMIX, or SURVEYLOGISTIC by <strong>de</strong>termining the contrast of logistic<br />

mo<strong>de</strong>l parameters that represents the <strong>de</strong>sired difference in log odds for two groups and then using the CONTRAST or<br />

ESTIMATE statement with the ESTIMATE=EXP or EXP option. Beginning with <strong>Sas</strong>/STAT 9.22 in <strong>Sas</strong> 9.2 TS2M3 when<br />

GLM parameterization of CLASS variables is used in the LOGISTIC, GENMOD, GLIMMIX, or SURVEYLOGISTIC<br />

procedures, you can also use the EXP option in the LSMESTIMATE statement, or the DIFF and EXP options in the<br />

LSMEANS and SLICE statements.<br />

Nonmo<strong>de</strong>ling methods: The RELRISK or MEASURES option in Base <strong>Sas</strong> PROC FREQ for 2x2 tables and the CMH option<br />

for stratified 2x2 tables provi<strong>de</strong> point estimates and confi<strong>de</strong>nce intervals. The OR and COMOR options in the EXACT<br />

statement provi<strong>de</strong> exact confi<strong>de</strong>nce intervals and tests. Also, OR option in <strong>Sas</strong>/Genetics PROC CASECONTROL.<br />

http://support.sas.com/kb/30/333.html<br />

Il y a même du flou autour du terme hors <strong>Sas</strong> http://www.amstat.org/publications/jse/v20n3/fulton.pdf<br />

mentionné par Rob in http://blogs.sas.com/content/<strong>Sas</strong>training/2013/02/14/what-are-the-odds-of-winning-the-lottery/<br />

Cependant, comme pour le graphique du lifetest, le citron odds-ratio, n’aura pas été pressé à fond, si nous ne<br />

montront pas comme essayer <strong>de</strong> les représenter par une proc SG.<br />

L’odds-ratio en representation graphique par une proc SG semble possible, mais en s’inspirant du co<strong>de</strong> lié à la<br />

figure 9.1.8 du «petit livre rouge » page 242.<br />

/*--mise en macro-variables d'info basées sur la table<br />

et utilisées pour les décalages Offset sur l'axe Y--*/<br />

data _null_;<br />

pct=0.70/nobs;<br />

height=14;<br />

dpi=100;<br />

call symputx("pct", pct);<br />

call symputx("pct2", 2*pct);<br />

call symputx("dpi", dpi);<br />

call symputx("height", height);<br />

call symputx("heightin", height || "cm");<br />

call symputx("thickness", floor(height*dpi*pct));<br />

set b.or nobs=nobs;<br />

run;<br />

/*--Enrichissement <strong>de</strong> la table déjà récupérée <strong>de</strong>s Odds-ratio--*/<br />

data b.oram;<br />

set b.or;<br />

OR='OR'; LCL='LCL'; UCL='UCL'; Sig="Signif";<br />

format oddsratioest lowercl uppercl 6.3;<br />

run;<br />

/*--Création <strong>de</strong> notre premier template <strong>de</strong> style graphique modifié--*/<br />

proc template;<br />

<strong>de</strong>fine style styles.ForestColor93;<br />

parent = Styles.htmlBlue;<br />

style GraphFonts from GraphFonts /<br />

'GraphDataFont' = (", ",7pt)<br />

'GraphValueFont' = (", ",7pt);<br />

style GraphData1 from GraphData1 /<br />

contrastcolor = GraphColors('gcdata2')<br />

color = GraphColors('gdata2');<br />

style GraphData2 from GraphData2 /<br />

contrastcolor = GraphColors('gcdata1')<br />

color = GraphColors('gdata1');<br />

end;<br />

run;<br />

170 <strong>Pratique</strong> <strong>de</strong> <strong>Sas</strong> windows ….93 <strong>Volume</strong> 2 et Coll.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!