1 / 16

Statistical Visualization Methods in SAS for Biostatistics Research

Explore various SAS visualization techniques like boxplot, lollipop graph, scatterplot, and survival plot in biostatistics research.

cmarion
Télécharger la présentation

Statistical Visualization Methods in SAS for Biostatistics Research

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Plots in SAS Boxplot, Lollipop graph, Scatterplot, Survival plot -SGPLOT, GCHART, SGPANEL, LIFETEST Xiaoyue Ma Research Biostatistician II Weill Cornell Medicine Division of Biostatistics and Epidemiology, Department of Healthcare Policy & Research402 E. 67th Street / C2 – LA0001B, New York, NY 10065 T: (646) 962-8029 xim2008@med.cornell.edu 05.23.2019

  2. Boxplot

  3. procsgplotdata=toothdat; vboxlen / category=dose boxwidth=0.8transparency=0.7; *boxplot; scatterx=dose y=len / jittertransparency=0.1 markerattrs=(symbol=CircleFilledsize=5) group=dose; *scatterplot; run;

  4. Bar graphs

  5. axis1value=(a=90width=0.5); procgchartdata=mtdat2; vbar type/type=meansumvar=mpg descendingsubgroup=cylmaxis=axis1space=1; run;

  6. Lollipop graph

  7. procsortdata=mtdat; by mpg; run; procsgplotdata=mtdatnoautolegendnoborder; needlex=type y=mpg / group=cyllineattrs=(thickness=2) baselineattrs=(thickness=0); bubblex=type y=mpg size=mpg/bradiusmin=8datalabeldatalabelpos=center; xaxisdisplay=(nolabelnoticks); yaxisoffsetmin=0display=(nolabelnoticksnoline) grid; run;

  8. data test; set test; zero=0; run; procsgpaneldata=test; panelbycyl/ layout=rowlatticenovarnameuniscale=column sort=descending; highlowy=type low=zero high=mpg / group=type; scattery=type x=mpg / group=type markerattrs=(symbol=circlefilled) markerchar=mpg; colaxisoffsetmin=0; rowaxisdisplay=(nolabelnoticks) valueattrs=(size=6); run;

  9. Scatterplot

  10. procsgplotdata=mtdat; regy=mpg x=wt /clmgroup=cylclmtransparency=0.6markerattrs=(size=5); run;

  11. procsgplotdata=mtdat; loessy=mpg x=wt /clmgroup=cyldegree=1markerattrs=(size=5) CLMTRANSPARENCY=0.6; run;

  12. datatest; setmtdat; ifcyl="4"thendo; mpg_4=mpg; wt_4=wt; end; ifcyl="6"thendo; mpg_6=mpg; wt_6=wt; end; ifcyl="8"thendo; mpg_8=mpg; wt_8=wt; end; run; procsgplotdata=test noautolegend; scattery=mpg x=wt /group=cyljitter; ellipse y=mpg_4 x=wt_4 ; ellipse y=mpg_6 x=wt_6 ; ellipse y=mpg_8 x=wt_8 /lineattrs=(pattern=dot) TRANSPARENCY=0.6; run;

  13. Survival plot

  14. proclifetestdata=colon plot=survival(clatrisk(outside) test); time time*status(0); /*put the censor value in the bracket*/ strata adhere/ test=logrank; run;

  15. Reference: • R plot: https://wcm-computing-club.github.io/file_slides/201904_Cooley_Visualization_in_R.html#introduction • Violin plot: https://blogs.sas.com/content/graphicallyspeaking/2012/10/30/violin-plots/#prettyPhoto • Lollipop chart: https://blogs.sas.com/content/graphicallyspeaking/2017/07/24/lollipop-charts/#prettyPhoto • Ellipse: https://blogs.sas.com/content/iml/2014/07/21/add-prediction-ellipse.html

More Related