1 / 19

SAS ® 9.2 Implications for Biotech Bay Area SAS User’s Group June 7 th 2010

SAS ® 9.2 Implications for Biotech Bay Area SAS User’s Group June 7 th 2010. Sarmad Pirzada, MD, MPH Cancer Research & Biostat. Seattle WA 98199 sarmad@hybriddatasystems.com. ODS Graphics SAS Graph Vs. Data Graphics Procedures PHREG LIFETEST SGPLOT SAS Graph Template

lesley
Download Presentation

SAS ® 9.2 Implications for Biotech Bay Area SAS User’s Group June 7 th 2010

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. SAS® 9.2 Implications for BiotechBay Area SAS User’s GroupJune 7th 2010 Sarmad Pirzada, MD, MPH Cancer Research & Biostat. Seattle WA 98199 sarmad@hybriddatasystems.com Bay Area SUG June 2010

  2. ODS Graphics SAS Graph Vs. Data Graphics Procedures PHREG LIFETEST SGPLOT SAS Graph Template SGPLOT & Related A Few Tricks SAS Installs OS Issues 32 Vs. 64 Bit M2 Vs M3 Win Server 2008 R2 Download Manager ODBC Driver Issues for 34 Vs. 64 Bit for Unix JAVA Applet Installs Topics for SAS Programmers and IT Bay Area SUG June 2010

  3. SAS/Stat PHREG Procedures < SAS9.2 • Data Step • Lots of SAS Code (>1,200 lines of macro code) • SAS Stat Proc Outputs • Data Step • SAS Graph Programs • Output (Not Easily Portable) Survival Curves Old Way <9.2 Bay Area SUG June 2010

  4. Code Example from < SAS9.1 for Survival Curves Bay Area SUG June 2010

  5. SAS/Stat PHREG Procedures > SAS9.1 ods graphics on; proc phreg data=s9321 plots(overlay=stratum)=survival; *ods select survivalplot; model surtim*surind(0)= age ; baseline covariates=ROW out=PRED survival=_all_/ROWID=ISS; run; ods graphics off; quit; Survival Curves New Way Bay Area SUG June 2010

  6. SAS/REG Procedures SAS9.2 ods graphics on; proc reg data=sashelp.class; model weight=height; quit; run; ods graphics off; Other ODS Graphics New Way Bay Area SUG June 2010 Ref: SAS/Stat® 9.2 User’s Guide: Stat Graphics Using ODS

  7. GTL and the SG Procedure Scatter Plot • Proc Template; • odslisting sge=on; • proctemplate; • define statgraph classscatter; • begingraph; • entrytitle'Weight by Height'; • layout overlay; • scatterplot y=weight x=height; • endlayout; • endgraph; • end; • run; • procsgrenderdata=sashelp.class template=classscatter; • run; • procsgplotdata=sashelp.class; • title'Weight by Height'; • scatterx=height y=weight; • run; Bay Area SUG June 2010 Ref: SAS/Stat® 9.2 User’s Guide: Stat Graphics Using ODS

  8. GTL and the SG Procedure Spline Regression Plot • odsgraphicson; • proctransregdata=sashelp.class; • modelidentity(weight)=spline(height); • outputout=class clmclip; • run; Bay Area SUG June 2010 Ref: SAS/Stat® 9.2 User’s Guide: Stat Graphics Using ODS

  9. GTL and the SG Procedure Box Plot proctemplate; define statgraph classboxplot; begingraph; entrytitle'Gender and Weight Distribution'; layout overlay; boxplot y=weight x=sex; endlayout; endgraph; end; run; procsgrenderdata=sashelp.class template=classboxplot; run; Bay Area SUG June 2010 Ref: SAS/Stat® 9.2 User’s Guide: Stat Graphics Using ODS

  10. SAS Graph Template Language (GTL) Bay Area SUG June 2010

  11. SAS Graph Template Language (GTL) Bay Area SUG June 2010

  12. SAS/Stat Survival Analysis: PROC PHREG Macro Errors • Macros Using PROC PHREG, developed prior to SAS9.2 will run into errors if macros are using default output names • Usage Note 37170 : Variable name in ParameterEstimates table changed from 'Variable' to 'Parameter' • Code: Output ParameterEstimate=PE(rename=(Parameter=Variable)); • This Topic covered in usage notes: http://support.sas.com/kb/37/170.html • In SAS9.2, Plots=Survival (CL), ODS Graphics plot does not extend the survival confidence limits to the last time for censored observations. • This Topic is covered in usage notes: http://support.sas.com/kb/35/951.html Bay Area SUG June 2010

  13. SAS/Stat Survival Analysis: Proc PHREG Hazard Ratios • GLM Parameterization: Wald Confidence limits provided by the HAZARDRATIO might be incorrect • Proc PHREG; • Class Gender Group/Param=GLM; • Model Duration*Censor(1)=Gender X Group X*Group; • Solution: Need to Compute Custom Hazards Ratios • HotFix http://ftp.sas.com/techsup/download/hotfix/HF2/A52.html#38391 Bay Area SUG June 2010

  14. SAS/Stat Survival Analysis: Proc PHREG Other Changes • Estimation Method: Default method for estimating survival function has changed to Cumulative Hazards from Product Limit (Method=CH Vs. Method=PL). Implication: If default method has been used in the past, the option needs to be changed for reproducing the same results. • More memory for survival analysis (Usage Notes: 37830) • Where statements may lead to syntax error • Example: Proc Phreg(where(age=1 or age=2) and x=‘B’ data=a; • Fix: Proc Phreg Data=a(where=((age=1 or age=2) and x=‘B’)); • On the Good Side: A Class Option in Phreg! Bay Area SUG June 2010

  15. proc options option=appletloc; run; proc options option=jreoptions; run; proc javainfo; run; IT/Install Related: Most Common ODS Graphics Error Error Log: ERROR: The Java proxy is not responding.ERROR: Unable to load the Java Virtual Machine. Please see the installation instructions or system administrator. Investigate under Win32/64: Bay Area SUG June 2010

  16. Investigations and e-mails for SAS Tech Support! Steps for checking JRE Version 1. Check to see if you have this a jvm.dll file here   C:\Program Files\Java\JRE1.5.0_12\bin\client\jvm.dll  2. Open a command prompt and go to   C:\Program Files\Java\JRE1.5.0_12\bin\   Issue the following at the prompt: java -version Save results for Tech Support:  3. Check your config file: c:\program files\sas\sasfoundation\9.2\nls\en\sasv9.cfg Search for the -jreoptions line   Review every thing that you see on the -jreoptions line  4. Review the logs in the following folder:  C:\Documents and Settings\userid\Application Data\SAS\LOGS Bay Area SUG June 2010

  17. %put %sysget(JAVA_HOME) ; %put %sysget(LD_LIBRARY_PATH) ; %put %sysget(LD_LIBRARY_PATH_32) ; %put %sysget(LD_LIBRARY_PATH_64) ; proc javainfo ; run ; proc javainfo picklist 'graph/graph.txt'; run; proc options option=jreptions ; run ; Modify JREOPTIONS value /opt/sas/SAS_9.2/SASFoundation/9.2/sasv9_local.cfg Add -Dsas.app.repository.path=/opt/sas/SAS_9.2/SASVersionedJarRepository/9.2/(machine name) Good SAS Tech Support Contact: Tim Braam SAS Technical Support/Unix Systems IT/Install Related: Most Common ODS Graphics Error Error Log: ERROR: The Java proxy is not responding.ERROR: Unable to load the Java Virtual Machine. Please see the installation instructions or system administrator. Investigate under Unix/Solaris: Bay Area SUG June 2010

  18. IT/Install Related DBC Drivers for Oracle 32 Vs. 64 Bit Issues (Notes) #--- This line assumes that ODBC is located in a directory other than /usr/local #---------------------------------------------------------------------------------------------------------------- LD_LIBRARY_PATH=$SYBASE/$SYBASE_OCS/lib:$ODBCHOME/lib/sparcv9:$ODBCHOME/lib:/usr/lib/sparcv9:/usr/lib:$ORACLE_HOME/lib:$ORACLE_HOME/lib32 http://support.sas.com/kb/11/728.html oracle 64 _____________________________________________ #!/bin/bash # IMPORTANT !!! # This script moves 32 bit modules to the executables # so that 32 bit ODBC drivers will work # Must be applied following all Service packs # --------------------------------------------------- #set -x VERS="9_2" OUT="/opt/sas/odbc9.2_change.""`date +'%Y%b%d'`"".log" OUTZIP="/opt/sas/odbc_bkup.""`date +'%Y%b%d%H%M'`"".zip" SASHOME=/opt/sas/SAS_9.2/SASFoundation/9.2 echo '****************************************' > $OUT echo 'starting bin/ODBC_9.2.bash ' >> $OUT echo '****************************************' >> $OUT function move_and_link {while read fn do echo " " >> $OUT fn2=${fn%_u} echo ". zipping $fn2 to zip file ">> $OUT zip $OUTZIP $fn $fn2 echo ".. moving $fn2 to $fn2.orig64 ">> $OUT mv -i $fn2 $fn2.orig64 echo "... linking $fn to $fn2" >> $OUT ln -s $fn $fn2 echo " " >> $OUT done } cd $SASHOME find $SASHOME -name '*_u' -print >/tmp/sas_odbc_files move_and_link < /tmp/sas_odbc_files rm /tmp/sas_odbc_files Bay Area SUG June 2010

  19. Summary • SAS9.2 has major changes in its graphics capabilities that are worth changing your code to • Challenges for IT in terms of 32 Vs. 64 Bit Operating Systems • Graph Template Language is a Powerful Tool for Programmers • Portable Graphics • Check your Essential Macros Prior to Migrating to 9.2M3 • Thank You! Bay Area SUG June 2010

More Related