Presentation is loading. Please wait.

Presentation is loading. Please wait.

Bay Area SUG June 2010 1 SAS ® 9.2 Implications for Biotech SAS ® 9.2 Implications for Biotech Bay Area SAS User’s Group June 7 th 2010 Sarmad Pirzada,

Similar presentations


Presentation on theme: "Bay Area SUG June 2010 1 SAS ® 9.2 Implications for Biotech SAS ® 9.2 Implications for Biotech Bay Area SAS User’s Group June 7 th 2010 Sarmad Pirzada,"— Presentation transcript:

1 Bay Area SUG June 2010 1 SAS ® 9.2 Implications for Biotech 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

2 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

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

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

5 Bay Area SUG June 2010 5 SAS/Stat PHREG Procedures > SAS9.1 Survival Curves New Way 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;

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

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

8 Bay Area SUG June 2010 8 GTL and the SG Procedure Spline Regression Plot ods graphics on; proc transreg data=sashelp.class; model identity(weight)=spline(height); output out=class clm cli p; run; Ref: SAS/Stat® 9.2 User’s Guide: Stat Graphics Using ODS

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

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

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

12 Bay Area SUG June 2010 12 SAS/Stat Survival Analysis: PROC PHREG 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.htmlhttp://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.htmlhttp://support.sas.com/kb/35/951.html Macro Errors

13 Bay Area SUG June 2010 13 SAS/Stat Survival Analysis: Proc PHREG 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 http://ftp.sas.com/techsup/download/hotfix/HF2/A52.html#38391 Hazard Ratios

14 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!

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

16 Bay Area SUG June 2010 16 Investigations and e-mails for SAS Tech Support! 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 Steps for checking JRE Version

17 Bay Area SUG June 2010 17 ERROR: The Java proxy is not responding. ERROR: Unable to load the Java Virtual Machine. Please see the installation instructions or system administrator. IT/Install Related: Most Common ODS Graphics Error %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 Error Log: Investigate under Unix/Solaris:

18 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

19 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!


Download ppt "Bay Area SUG June 2010 1 SAS ® 9.2 Implications for Biotech SAS ® 9.2 Implications for Biotech Bay Area SAS User’s Group June 7 th 2010 Sarmad Pirzada,"

Similar presentations


Ads by Google