/* GraphPow.sas, graphics module (non-macro) for plotting results from UnifyPow 2001 Copyright (c) by Christine I. Skibinski, M.S. Department of Biostatistics and Epidemiology Cleveland Clinic Foundation Cleveland, OH 44195 Voice: 216-444-9943 Fax: 216-444-8023 cskibins@bio.ri.ccf.org This graphics module is designed to be autogenerating with a single macro call of %graphs(parameters= stmts). These parameters allow for specifying titles, labeling of the x-axis & y-axis, and specifications to how and where the output should be sent. As of this version, graphics output may be directed to either the screen or to a graphics file in the specified directory location. Current capabilities allow for plotting of results of power or the total sample size, pairs or total pairs depending on the analysis problem. The program currently runs for all examples included in the June2000 release of Ralph O'Brien's UnifyPow. Certain analysis problems allow for multiple methods for results. In these situations, a single method may be the preferred statistical method. For example, one of these cases, Comparing 2 Independent Proportions, the Approximate Unconditional chi2 test, is the preferred method. In this case, only the preferred method ( NumPlots=minimal ) will be plotted. The additional plots may be requested by specifying NumPlots=all . ==> For most of the examples, the default at this time is to plot all methods. The following commands must be included in the macro call following the include statement for GraphPow : For example: ** specify file locations, this assumes you have copied the code to a ** folder on your local machine/PC ; %let UnifyPow = .../UnifyPow.sas ; %let GraphPow = .../GraphPow.sas ; %include "&UnifyPow"; . . . . . %tables; %include "&GraphPow"; %graphs( title1= , ** default: no overall titles, just title2= , the Method and Statistic title3= , per each graph title4= , xlabel= , ** default: Power or ylabel= , ** Total Sample Size Data = PowData , ** default: PowData (see Note1) GrphFile= GrphFile , ** default: graphs.ps (see Note2) GrphType= GrphType , ** default: PS; others: EPS,PDF,etc.(see Note3) AddPlots= AddPlots , ** default: REPLACE; others: APPEND (see Note4) NumPlots= Numplots ) ; ** default: MINIMAL; others: ALL where DataFile, GrphFile, GrphType, AddPlots and Numplots are either specified, or left blank ************************************************************************* ************************************************************************* ===> The GraphPow program _WILL_ run, with only the %graphs command for example: %include "&GraphPow"; %graphs; Running the program in this manner utilizes the default values within the program, generating a postscript plot, named graphs.ps ************************************************************************* ************************************************************************* ---> The GraphPow program allows for editing of the title & axis labels through the use of the: title1= , title2= , title3= , title4= , xlabel= , ylabel= , macro variables. ---> The GraphPow program also allows the macro variables to be defined, by way of %let statements, and only specify ONCE rather than in each %graphs call: 1. a filename for the graphical output ( GrphFile ) 2. the type of output ( GrphType ) if PostScript (PS) is not the preferred format. for example: %let GrphFile = .../pgs26_59.plt ; %let GrphType = PDF ; with formats being dependent upon SAS version ex. eps, pdf, cgm (see Note 3) ---> The GraphPow program will automatically determine whether the graphics output is to be routed to a graphics stream file (GSF) or to the screen depending on whether GrphFile = is specified in the macro call. GrphFile = /home/cskibins/beta_unify/module2.ps example for Unix GrphFile = C:\SAS\UnifyPow_pgms\modulepc.ps example for PCWindows ** ==> Note1: The default dataset used to generate all plotting data is the PowData dataset from the %UnifyPow call. This is also the same dataset used to generate the Proc Tabulate output tables using the %tables command. ** ==> Note2: If the GrphFile macro variable is left blank, the program will default to sending the graphics output to the screen. Code is already incorporated into the program to determine the correct operating system (Unix=xcolor; PC Windows=win). If neither of these are appropriate, specify the correct gsfdevice using the GrphType= macro variable. ** ==> Note3: Please be aware of the graphic deivice you specify, there have been changes between V6.12 & v8.0 as to the file formats that SAS/GRAPH v8.0 _now_ supports. v8 formats: BMP Windows bitmap CGM Computer graphics metafile EPS Adobe's encapsulated PostScript language GIF GIF format HP-GL Hewlett Packard's Graphics Language (plotter control language) JPEG JPEG format PBM Portable bitmap PDF Portable Document Format PNG Portable Network Graphics format PS Adobe's PostScript language PPM Portable pixmap TIFF Tagged Image Format File v6.12 formats: PS Adobe's PostScript language EPS Adobe's encapsulated PostScript language ** ==> Note4: If you specify the graphic output file in the primary program (ie., where you call UnifyPow & GraphPow), ex. %let GrphFile = actual_file_location ; the macro will bring that into the graphics program. This is a convenient way to specify the graphics location only once for many calls, and then just specify whether to append additional graphs to the existing file (ie., AddPlots=append ). Appending graphs on to an existing file can also be done in this same manner by specifying %let AddPlots = append ; ---> If you wish to run multiple UnifyPow program calls, each with graphics output to a GSF file, you may do this in two ways. In each subsequent UnifyPow run, prior to the %graphs(...) call : 1. provide a new graph file (eg., %let GrphFile=newfile2 ) 2. specify %let Addplots = append and the graphics output will continue to append to the initial file specified. Note: if Addplots is not specified, the graphics output will write over the original file, ie., gsfmode=replace. ************************************************************************* ************************************************************************* ** ** optional parameters have been incorporated into graphic ouptut ** ==> PRIMARILY FOR TESTING/DEVELOPMENT PURPOSES !!! <== ** DEFAULT footnote is NO FOOTNOTE, if addfootr=1 the default is: footnote j=l h=1.4 "&probtitl" ; ** if timestmp is set at 1, ** the footnote statement becomes: footnote j=l h=1.4 "&probtitl" j=r h=1.4 "×tmp" ; %let addfootr = 0,1; ** DEFAULT=0, when set = 0, overides _ANY_ footnote ; %let timestmp = 0,1; ** 1: provides ==> %str(j=r "&sysdate &systime"); ************************************************************************* ************************************************************************* This module is only in draft form, to provide an idea of future directions of the UnifyPow capabilities. The programming is in a form which can be easily modified by the end user for their purposes, as is the %tables module provided by Ralph O''Brien. ************************************************************************* ************************************************************************* *** Additional directions/updates envisioned for the GraphPow *** program along with Beta release comments: *** - allow for single plot per page regardless of problem type - allow for specification of individually requested plots vs all plots or the default plots, when multiple methods, tests, &/or parent distributions are provided from UnifyPow - incorporate additional example types as they are added to UnifyPow *** ************************************************************************* ************************************************************************* ; Example lines for running code: ** use code like these lines for running on Unix ; %let UnifyPow = /home/robrien/UnifyPow.sas ; %let GraphPow = /home/cskibins/beta_unify/GraphPow.sas ; ** use code like these lines for running on PC ; %let UnifyPow = C:\SAS\UnifyPow.sas ; %let GraphPow = C:\SAS\GraphPow.sas ; ************************************************************************* ** end instuctional text for graphics module for UnifyPow program ************************************************************************* ************************************************************************* */ ************************************************************************* ** ** section I ** begin GraphPow.sas program compilation/run **; %put current run time: &sysdate &systime; options ls=78 ps=58 nocenter nodate formdlim='' ; ** determine user environment : %put *** ==> sys device is &sysdevic ; %put *** ==> operating sys is &sysscp ; %put *** ==> SAS software release is &sysver ; %put ; ************************************************************************* * I.a ; %macro checkds(dsn=); ** determine whether UnifyPow exexuted properly ** creating a dataset & observations within that dataset ; %global rungraph ; %let rungraph=; %if %sysfunc(exist(&dsn)) %then %do; %let dsid = %sysfunc(open(&dsn)); %if &dsid %then %do; %let nobs = %sysfunc(attrn(&dsid,NOBS)); %let rc = %sysfunc(close(&dsid)); %put *** ==> UnifyPow program executed ; %put *** ==> number of observations in POWDATA : &nobs ; %if &nobs>0 %then %do; %let rungraph=1 ; %put *** ; %put *** ==> UnifyPow program executed - continuing with GraphPow ; %put *** ; %end; %end; %end; %else %put *** ==> UnifyPow program DID NOT execute - GraphPow will not proceed ; %mend; %put ; ************************************************************************* * I.b ; %macro probtyp; %global probtitl ; ** determine problem type, code provided within external code to ** UnifyPow _or_ GraphPow for user purposes ; %if %length(&probtitl)>0 %then %do; %put *** ; %put *** ==> problem: &probtitl ; %end; %if %length(&probtitl)=0 %then %let probtitl=; %mend; ************************************************************************* * I.c ; %macro ver8; %if &sysver>=7 %then %do; options validvarname=upcase ; %end; %mend; %ver8; %macro det_sys; ** use SAS macro variable to determine operating system for ** setting of device type for output directed to the screen ; %global deviceis; ** use for default screen display of plots ; %if %index(%upcase(&sysscp),SUN)>0 %then %do; %let deviceis = xcolor ; %end; %if %index(%upcase(&sysscp),WIN)>0 %then %do; %let deviceis = win ; %end; %put *** *** USER ENVIRONMENT *** *** ; %put *** operating system is: &sysscp ; %put *** screen device assigned as: &deviceis ; %put *********************************** ; %put ; %mend det_sys; %det_sys; ** increase size of labels, values, text for better resolution ; * original annotate label: size=1.4 ; %let lablsz=1.6 ; * original goptions settings: htitle=2.4 hby=2 htext=1.8 ; %let htitl=2.6 ; %let hbyst=2.2 ; %let htxt =2.0 ; ** set default to screen, ** can reassign to file via GrphFile filename statements ; %let where = screen ; ************************************************************************* * I.d ; ** for Logit problem type, the probstmt dataset variable ** and an additional dataset (STOREPOW) exist to differentiate ** from the "2 indep proportions" problem type ; %macro chklogit; %global dset cellprob ; %let dset= ; %let cellprob= ; %if &rungraph=1 %then %do; proc sql noprint; select trim(left(memname)) into :dset from sashelp.vtable where libname='WORK' and memname='STOREPOW' ; select index(probstmt,'Cell') into :cellprob from work.powdata ; %put ; %put ** ==> obtain identifier macro variables for Logit problem ; %put ** ==> dset: &Data ; %put ** ==> cellprob: &cellprob ; %end; %mend; ************************************************************************* * I.e ; %macro develop; ** macro to set apart check variables created during development ** chk variables for program coding & excution (development stage) ; %global getdata chkcode chkdata dographs filenm addfootr addplts timestmp ; data temp; attrib getdata_ chkcode_ dograph_ addfoot_ timest_ length=4 chkdata_ addplts_ length=$60 ; array nums(5) getdata_ chkcode_ dograph_ addfoot_ timest_ ( . . . . . ) ; array chars(2) chkdata_ addplts_ ( ' ', ' ' ) ; getdata_ = symget('getdata') *1 ; chkcode_ = symget('chkcode') *1 ; dograph_ = symget('dographs') *1 ; addfoot_ = symget('addfootr') *1 ; if length(symget('timestmp'))>0 and symget('timestmp')*1 ne 0 then timest_ = 1 ; addplts_ = symget('addplots') ; chkdata_ = symget('chkdata') ; put '***'; put '*** check variables for development runs' ; put 'getdata_ is ' getdata_ ; put 'chkcode_ is ' chkcode_ ; put 'dograph_ is ' dograph_ ; put 'timest_ is ' timest_ ; put '***'; run; data temp; set temp; ** reset development variables to default values ** for non-development runs ; ; if getdata_=. then getdata_=0; if chkcode_=. then chkcode_=0; if dograph_=. then dograph_=1; if addfoot_=. then addfoot_=0; if timest_ =. then timest_ =0; run; data; set temp; call symput('getdata', trim(left(put(getdata_, 1.))) ); call symput('chkcode', trim(left(put(chkcode_, 1.))) ); call symput('chkdata', trim(left(put(chkdata_, $VARYING60.))) ); call symput('dographs', trim(left(put(dograph_, 1.))) ); call symput('addfootr', trim(left(put(addfoot_, 1.))) ); if upcase(trim(left(put(addplts_, $VARYING60.)))) in ('YES','APPEND','1') then call symput('addplots', 'append' ); else do; %let addplots=; end; run; %put ; %put *** ==> development & execution macro variables ; %put *** getdata: &getdata ; %put *** chkcode: &chkcode ; %put *** chkdata: &chkdata ; %put *** dographs: &dographs ; %put *** addfootr: &addfootr ; %put ; %mend; %develop ; %macro ftnotes; ** additional development program code, which may be useful in ** specifiying the problem type &/or date,time of run for ** documentation purposes -- user needs to specify ** the folowing additional variables OUTSIDE/PRIOR to ** the %include call for GraphPow ** -- addfootr ** -- timestmp ** -- probtitl ** ** adds footnotes to each individual plot, NOT to the overall ** aggregate GREPLAY plots ; %if &addfootr=1 & ×tmp=0 %then %do; footnote j=l h=1.4 "&probtitl" ; %put *** ; %put *** ==> footnote: &probtitl ; %end; %else %if &addfootr=1 and ×tmp=1 %then %do; footnote j=l h=1.4 "&probtitl" j=r h=1.4 "&sysdate &systime"; %put *** ; %put *** ==> footnote: j=l &probtitl j=r &sysdate &systime ; %end; %mend; options nosymbolgen ; ************************************************************************* ** ** section II - Graphics ** ************************************************************************* ************************************************************************* ** BEGIN graphics module for UnifyPow program ************************************************************************* ************************************************************************* ; ** initialize macro variables as necessary: ; ** initialize dummy macro variables for the macro call ** allowing for specification of specific requested ** output parameters **; %macro presetvals; %global graphfile1 graphtype1 addplots1 numplots1 ; %let graphfile1 =; %let graphtype1 =; %let addplots1 =; %let numplots1 =; %if %length(%cmpres(&grphfile))>0 %then %let graphfile1 = &Grphfile ; %if %length(%cmpres(&grphtype))>0 %then %let graphtype1 = &Grphtype ; %if %length(%cmpres(&addplots))>0 %then %let addplots1 = &Addplots ; %if %length(%cmpres(&numplots))>0 %then %let numplots1 = &NumPlots ; %put graphfile1 &graphfile1 ; %put graphtype1 &graphtype1 ; %put addplots1 &addplots1 ; %put numplots1 &numplots1 ; %mend; %presetvals; %macro graphs(title1= , title2= , title3= , title4= , xlabel= , ylabel= , Data = , GrphFile = , GrphType = , Addplots = , NumPlots = ) ; %put *** *** checking defaults settings just after macro call *** *** ; %put *** *** with setting of default settings *** *** ; %put ** set defaults if empty ** ; %if %length(&data)=0 %then %let Data = PowData ; %if %length(&GrphFile)=0 %then %do; %if %length(&graphfile1)=0 %then %let GrphFile = graph.ps ; %if %length(&graphfile1)>0 %then %let GrphFile = &graphfile1 ; %end; %if %length(&GrphType)=0 %then %do; %if %length(&graphtype1)=0 %then %let GrphType = ps ; %if %length(&graphtype1)>0 %then %let GrphType = &graphtype1 ; %end; %if %length(&AddPlots)=0 %then %do; %if %length(&addplots1)=0 %then %let AddPlots = replace ; %if %length(&addplots1)>0 %then %let AddPlots = &addplots1 ; %end; %if %length(&NumPlots)=0 %then %do; %if %length(&numplots1)=0 %then %let NumPlots = minimal ; %if %length(&numplots1)>0 %then %let NumPlots = &numplots1 ; %end; %put ; %put ; %put *** *** finalized macro variable values : ; %put data ==> &data ; %put grphfile ==> &grphfile; %put grphtype ==> &grphtype; %put addplots ==> &addplots; %put numplots ==> &numplots; %put ; %put *** Check for execution of UnifyPow program *** ; %checkds(dsn=work.&Data); %probtyp ; %chklogit ; %ftnotes ; *----------------------------------------------------------------------*; ** use SAS macro variable to determine whether SAS/Graph is ** installed on the users environment ; filename graf clear ; ** ** determine whether UnifyPow executed properly, ** and if so, proceed with GraphPow ** ; %if &rungraph=1 %then %do; *----------------------------------------------------------------------*; ** offset program development variables to set code to execute ** correctly for the default run -- producing graphics from UnifyPow ; %put ** ** chkcode variable is set to: &chkcode ; %let probchk= ; %if &chkcode=0 %then %do; %let probchk = %str(options nosymbolgen nomlogic nomprint; *) ; %end; %put ** ** probchk variable is set to: &probchk ; %put ** ** getdata= &getdata ; %if &getdata=1 %then %do; %if %length(&chkdata)>0 %then %do; proc printto print="&chkdata" ; %end; proc print data=powdata (obs=3); title "tabltype: &tabltype tabltyp2: &tabltyp2 tabltyp3: &tabltyp3"; title2 "methlabl: &methlabl probtype: &probtype"; title3 "&probtitl"; title4 "&sysdate &systime"; run; proc printto; %end; title; *----------------------------------------------------------------------*; ** getdata & dographs are set to default variables automatically ; %if &getdata ne 1 and &dographs>=1 %then %do; ** start getdata=0 loop ; *----------------------------------------------------------------------*; ** program code checks for whether the product SAS/Graph is installed ** in order for the program to execute and produce graphic results, ** -- if NOT, program jumps past the do loop and exits the program ** under each situation, a message is written to the users program log **; %if %sysprod(graph)=1 %then %do; %put *** starting sysprod(graph)=1 loop ; %put ; %put *** *** USER ENVIRONMENT ERROR CHK *** *** * ; %put ** SAS/Graph IS INSTALLED ON THIS SYSTEM * ; %put ** GRAPHICS MODULE FOR UNIFYPOW WILL PROCEED * ; %put ************************************************ ; %put ; ************************************************************************* ************************************************************************* ** BEGIN graphics processing for SAS/Graph enabled systems ************************************************************************* ************************************************************************* ** ** Section II -- set up plots from data for Gplot runs ** *----------------------------------------------------------------------*; ** II.a ; &probchk options mlogic symbolgen mprint ; ** define goptions parameters for display to screen or output file ** from defaults of SCREEN and FILE (to postscript) ; %if %length(&GrphFile)>0 %then %do; %let where=FILE; filename graf "&GrphFile" ; %end; %put *** ==> file specification for plot is &GrphFile ; %if %length(&GrphFile)=0 %then %let where=SCREEN; %put *** ==> current where value is &where ; ** v8 change to default setting for framing the plots ** v6 default=noframe, v8 default=frame ** declare macro variable to set graph option to NOFRAME ; %if &sysver>=7 %then %let frame=noframe; %else %let frame=; ** allow for user to specify goptions device other than the defaults ** graph type is specified by user, default is postscript, and PS works in ** the Unix and Windows environments ** deviceis is obtained by the macro variable sysscp & the operating system ** and is used when routing output to the screen ; ** define targetdevice default as postscript ; %put *** chk for resolution of new targetdevice and new device ; %let target=&GrphType ; %put *** target (local var within macro call) = &target ; %put ; *----------------------------------------------------------------------*; ** II.a.1 ; %if %upcase(&where)=SCREEN %then %do; %let devicenm=&deviceis; %let prompt=prompt; %let display=%str(display targetdevice=&target); %let graf_plt=; %end; %if %upcase(&where)=FILE %then %do; %let devicenm=⌖ %let prompt=noprompt; %let graf_plt=graf; ** v8 nodisplay _also_ turns off display/write to external file ; %if &sysver>=7 %then %let display=%str(display targetdevice=&target); %else %let display=%str(nodisplay targetdevice=&target); %end; *----------------------------------------------------------------------*; %put ; %put *** ; %put *** ==> routing output to = &where ; %put *** ==> default/specified device to = &GrphType ; %put *** ==> gsf device name = &devicenm ; %put *** ==> gsf targetdevice name = &target ; %put *** ==> device for screen output = &deviceis ; %put *** ==> graph output file is = &graf_plt ; *----------------------------------------------------------------------*; ** II.a.2 ; ** allow user to specify : ** title statements (title1-title4) ** y-axis statement (ylabel) ** x-axis statement (xlabel) ** to overwrite the normal defaults ; %global angle r_titl1 r_titl2 r_titl3 r_titl4 r_xlabl r_ylabl ; %let r_titl1=; %let r_titl2=; %let r_titl3=; %let r_titl4=; %let r_xlabl=; %let r_ylabl=; %let r_size1=1.8; %let r_size2=1.6; %if %length(&title1)>0 %then %let r_titl1=%str(title1 h=&r_size1 c=black "&titl1";) ; %if %length(&title2)>0 %then %let r_titl2=%str(title2 h=&r_size2 c=black "&titl2";) ; %if %length(&title3)>0 %then %let r_titl3=%str(title3 h=&r_size2 c=black "&titl3";) ; %if %length(&title4)>0 %then %let r_titl4=%str(title4 h=&r_size2 c=black "&titl4";) ; %put ; %put ** ==> title1: &title1 r_titl1: &r_titl1 ; %if %length(&ylabel)>0 %then %let r_ylabl=%str("&ylabel"); %if %length(&xlabel)>0 %then %let r_xlabl=%str("&xlabel"); *----------------------------------------------------------------------*; ** II.a.3 ; ** allow user to append graphic output to specified file, ** or overwrite the file (default) ie., gsfmode=replace ; %if %length(&AddPlots)=0 %then %let replace=replace; %if %length(&AddPlots)>0 %then %do; %if %upcase(&AddPlots)=REPLACE %then %let replace=replace; %else %let replace=&AddPlots; %end; %put *** ==> replace mode is = &replace; *----------------------------------------------------------------------*; ** II.b ; ** define plotting problem, power vs ntotal or ntotal vs power ; %if &ResltVar = power %then %do; %let xaxis = NTotal; %let yaxis = power; %end; %if &ResltVar = NTotal %then %do; %let xaxis = NomPower; %let yaxis = NTotal; %end; *----------------------------------------------------------------------*; ** II.c ; data dset; set powdata ; ** based on user specified UnifyPow statements, define parameters ** for definitions of graphing module ; *** need to allow for the following tabltypes from R.OBriens *** program code for the tables module * * (need to chk output from overall code to verify x*y=grp coding) * GnrlPow tPow WlcxnPow 1or2WlcxnPow WlcxMuPpow WlcxPaMuPow tPaMuPow FPaMuPow tmuP_Pow FMuP_Pow FPow 1betaOLS tabltyp2=FindNPow, tabltype ne none tabltyp3=Pi1Specl ; ** currently works for the following problem types : ** (numbers indicate problem example code program) ** ** 1 testing single proportion, sign test or custom null ** 11 comparing 2 independent proportions ** 2 ordinary 2-group ttest (W-M-W, see prob 4) ** 3 mean difference of paired obs: ttest (see 6 for nonnormal distbn) ** 9 one-way ANOVA with contrasts ** 12 McNemars test of 2 correlated proportions ** 13 testing a single Pearson correlation ** 14 testing two Pearson correlations ** 15 comparing nested (full v. reduced) OLS regressions * ** 20 association in RxC contingency table ** 10 2group (AB/BA) crossover design via ttests on differences ** 4 2group Wilcoxon-Mann-Whitney (mu, SD) (ttest, see prob 2) ** 5 2group Wilcoxon-Mann-Whitney (p1) ** 6 difference of paired obs, (see 3 for normal distbn) matched pairs design, Wilcoxon signed rank ** 7 2groups ordered categorical outcome W-M-W ** 8 Wilcoxon signed rank: 1group interval-level categorical outcome ** 21 goodness of fit of multinomial distribution ** 22 Poisson regression ** 23 Logistic regression ** 30 Blackwelders 1sided equivalency testing strategy ** 31 testing single beta in a k-variable OLS regression model ** 32 GLM (intro): traditional ttest ** 33 GLM: 1way analysis of covariance w/contrasts ** 34 Logit analysis (intro) comparing 2 indep proportions ** 35 Logit analysis ; %put ** ==> Problem category: &tabltype ; %put ** ==> cellprob: &cellprob ; %let whstmt=; *----------------------------------------------------------------------*; ** II.c.1 ; %if %upcase(&NumPlots) = MINIMAL %then %do; %if &tabltype=GnrlPow and &tabltyp2=none and &tabltyp3=none and &probtype=pi %then %do; ** use only the Approximate Unconditional chi2 test for 2 indep proportions ** probstmt provides pi value(s) ; %if &cellprob=0 %then %let whstmt = %str( and substr(effctitl,1,4)='Appr') ; ** default to all effects for logit analyses ** probstmt provides Cell Probability value(s) ; %if &cellprob>0 %then %let whstmt = ; %end; * end probtype=pi loop ; %end; * end default only loop ; %put ** ==> pgm code statement for default plots for 2 indep proportions ; %put ** ==> whstmt: &whstmt ; %put ** ==> dset: &dset ; *----------------------------------------------------------------------*; ** II.c.2 ; %let suppr_by=%str(options byline ;); %let bynote_1= ; %let bynote_2= ; %let dummyv = ; %if &tabltype = tPow or &tabltype = FPow %then %do; * includes ordinary 2group ttest * includes one-way ANOVA * includes GLM (intro): traditional ttest * includes GLM: 1way analysis of covariance w/contrasts ; %let bystmt = effctitl testtype alpha ; %let grfgrp = sd ; %end; %else %if &tabltype = GnrlPow %then %do; * includes Exact binomial one sample pi &tabltyp3 = Pi1Specl * includes two sample pi, 2 indep proportions * includes single Pearson correlation * includes two Pearson correlations * includes nested OLS regressions * includes McNemar 2 correlated proportions * includes association in RxC contingency table * includes goodness of fit of multinomial distribution * includes Poisson regression * includes Logistic regression * includes Blackwelders 1sided equivalency testing strategy * includes Logit analysis (intro) comparing 2 indep proportions * includes Logit analysis ; %let bystmt = effctitl testtype ; %let grfgrp = alpha ; %if &probtype=pi and &tabltyp3=none %then %do; %if &cellprob>0 %then %do; * includes Logit analysis ; if index(effctitl,"Standard Only")>0 then dummyvar=1; else if index(effctitl,"Lyons(lin) Gi")>0 then dummyvar=2; else if index(effctitl,"Lyons Given S")>0 then dummyvar=3; else if index(effctitl,"Lyons Main [L")>0 then dummyvar=4; else if index(effctitl,"Lyons Main [W")>0 then dummyvar=5; else if index(effctitl,"Lyons(lin) Su")>0 then dummyvar=6; %let bystmt = dummyvar effctitl testtype ; %let grfgrp = alpha ; %let suppr_by = %str(options nobyline ;); %let dummyv = 3 ; * set plots to 3 per page ; %let bynote_1 = %str(trim(left(putc(effctitl,60.)))||' '||trim(left(putc(testtype,60.))) ); %end; %if &cellprob=0 %then %do; * includes 2 indep proportions ; %if %length(&dset)=0 %then %do; %let bystmt = effctitl testtype ; %let grfgrp = alpha ; %end; * includes Blackwelders analysis ; %if &dset=STOREPOW %then %do; %let bystmt = probstmt nullvalu effctitl ; %let grfgrp = alpha ; %end; %end; %end; %end; %else %if &tabltype = tPaMuPow %then %do; * includes matched pairs t-test * includes 2group (AB/BA) crossover design via ttests on differences ; %let bystmt = effctitl testtype alpha sdmult ; %let grfgrp = corr ; %end; %else %if &tabltype = WlcxnPow or &tabltype = 1or2WlcxnPow %then %do; ** ** due to length of bystmt, need to switch byline with note stmt(s) ; * includes 2group Wilcoxon-Mann-Whitney (mu, SD) * includes 2group Wilcoxon-Mann-Whitney (p1) * includes 2groups ordered categorical outcome W-M-W * includes Wilcoxon signed rank: 1group interval-level categorical outcome ; if index(effctitl,"Lehmann")>0 then dummyvar=1; else if index(effctitl,"Noether")>0 then dummyvar=2; else if index(effctitl,"Ordinary")>0 then dummyvar=5; else if index(effctitl,"Matched")>0 then dummyvar=4; else if index(effctitl,"ARE")>0 then dummyvar=3; %let bystmt = dummyvar effctitl testtype alpha parent ; %let grfgrp = sd ; %let suppr_by = %str(options nobyline ;); %let dummyv = 3 ; * set plots to 3 per page ; %if &tabltype=1or2WlcxnPow and (&probtype=2WilcOrdCat or &probtype=1WilcOrdCat) %then %do; %let dummyv = 2 ; * set plots to 2 per page ; %end; %let bynote_1 = %str(trim(left(putc(effctitl,60.))) ||' '||trim(left(putc(testtype,60.))) ); %let bynote_2 = %str('Alpha=' || trim(left(alpha)) ||' '|| 'Parent=' || trim(left(putc(parent,60.))) ) ; %end; %else %if &tabltype = WlcxPaMuPow %then %do; * includes difference of paired obs, matched pairs design, Wilcoxon signed rank ; if index(effctitl,"Lehmann")>0 then dummyvar=1; else if index(effctitl,"Noether")>0 then dummyvar=2; else if index(effctitl,"Ordinary")>0 then dummyvar=3; else if index(effctitl,"Matched")>0 then dummyvar=3; %let bystmt = dummyvar effctitl testtype alpha sdmult parent ; %let grfgrp = corr ; %let suppr_by = %str(options nobyline ;); %let dummyv = 3 ; * set plots to 3 per page ; %let bynote_1 = %str(trim(left(putc(effctitl,60.))) ||' '||trim(left(putc(testtype,60.))) ); %let bynote_2 = %str('Alpha=' || trim(left(alpha)) ||' '|| 'Parent=' || trim(left(putc(parent,60.))) ||' '|| 'SD Multiplier=' || trim(left(sdmult)) ) ; %end; %else %if &tabltype = 1betaOLS %then %do; * includes testing single beta in a k-variable OLS regression model ; %let bystmt = effctitl testtype betawt tolernce sdx alpha ; %let grfgrp = sd ; %let suppr_by = %str(options nobyline ;); %let bynote_1 = %str(trim(left(putc(effctitl,30.))) ||' '||trim(left(putc(testtype,30.)))||' Alpha='||trim(left(alpha)) ); %let bynote_2 = %str( 'Beta Coefficient='|| trim(left(betawt))||' '|| 'Tolerance(X)=' || trim(left(tolernce)) ||' '|| 'SD(X)=' || trim(left(sdx)) ) ; %end; *----------------------------------------------------------------------*; ** II.d ; %if %length(&r_titl1)>0 %then %let suppr_by = %str(options nobyline ;); %put ; %put ** ==> Due to length of ByStmts, needed to omit byline & add note stmts ; %put ** ** bynote_1: &bynote_1 ; %put ** ** bynote_2: &bynote_2 ; %put ** ** tabltype: &tabltype ; %put ; ************************************************************************ ** ** Section III -- create information for & do Gplot runs from data ** ************************************************************************ ; *----------------------------------------------------------------------*; ** III.a ; goptions rotate=landscape gsfmode=&replace device=&devicenm targetdevice=&target noprompt nodisplay ftitle=triplex fby=triplex ftext=duplex htitle=&htitl hby=&hbyst htext=&htxt ; * htitle=2.4 hby=2 htext=1.8 ; options nomprint; proc sort data=dset; by &bystmt &grfgrp &xaxis; proc sort data=dset out=sortdpow; by &xaxis; ** ** from specified program statements ** get either the requested sample sizes _or_ requested powers ** from the program lines for x-axis of plot ; data _null_; set sortdpow end=lastrec; by &xaxis; length ntot $ 140 ; retain ntot ' '; if first.&xaxis then ntot=trim(left(ntot))||'/'||trim(left(&xaxis)); if lastrec then call symput('axisvals',translate(trim(left(ntot)),' ','/') ); %put *** ==> axisvals: &axisvals; *----------------------------------------------------------------------*; ** III.b ; ** ** define labels to graph lines based on either the number of ** alphas requested or sds requested, depending on analysis problem ; data annoinfo; set dset (keep= &bystmt &grfgrp &yaxis &xaxis); by &bystmt &grfgrp &xaxis; if first.&grfgrp; data annoinfo; ** label/annotate the grouping lines of the plot ; length function style color $ 8 position $1 text $ 60; set annoinfo (keep= &bystmt &grfgrp &yaxis &xaxis); by &bystmt &grfgrp &xaxis; function='label'; style='duplex'; color='black'; size=&lablsz ; *size=1.4 ; position='1'; * position text 1 cell up & left (11 oclock) ; xsys='1'; * percentage of axis ; x=16 ; ysys='2'; * value of axis ; y=&yaxis ; %if &resltvar=power %then %do; * drop text position 0.5 cell to allow for legibility if resultant y-axis values are similar ; if 00 %then %do; ** add notation for Wilcoxon-Mann-Whitney plots -- byline becomes truncated ; style='triplex'; size=&hbyst-0.45 ; *size=2.0 ; position='5'; xsys='1'; * percent of data x-axis ; ysys='5'; * percent of total graph y-axis ; %if %length(&bynote_1)>0 %then %do; x=50; y=98; text=&bynote_1; output; %end; %if %length(&bynote_2)>0 %then %do; y=94; text=&bynote_2; output; %end; %end; proc sort data=annoinfo; by &bystmt &grfgrp &xaxis; *----------------------------------------------------------------------*; ** III.c ; ** set defaults ; %let numppg=1; %let parents=; %let num_effs=1; proc sql; reset noprint; %macro grftyp; %if &grfgrp=sd %then %do; select count(distinct alpha) into :numppg from powdata ; %end; %if &grfgrp=corr %then %do; select (count(distinct alpha) * count(distinct sdmult) ) into :numppg from powdata ; %end; %mend grftyp; %macro getyaxis; %global minyval maxyval; %if &resltvar=power %then %do; %let lofunc = floor(min(&yaxis)*10)/10 ; %let hifunc = ceil(max(&yaxis)*10)/10 ; %end; %if &resltvar=NTotal %then %do; %let lofunc = floor(min(&yaxis)/10)*10 ; %let hifunc = ceil(max(&yaxis)/10)*10 ; %end; select &lofunc into :minyval from powdata ; select &hifunc into :maxyval from powdata ; %put *** ==> minyval: &minyval; %put *** ==> maxyval: &maxyval; %mend getyaxis; %grftyp; %getyaxis; select sum(distinct tails) into :numtails from powdata ; %if &tabltype = 1betaOLS %then %do; select count(distinct tolernce) into :n_tols from powdata; select count(distinct sdx) into :n_sdxs from powdata; %end; ** end proc sql statements ; *----------------------------------------------------------------------*; ** III.d ; %if &tabltype = FPow %then %let numppg = 1 ; %if &probtype = 2WayCT or &probtype = GoodOFit %then %let numppg = 2 ; %if %length(&dummyv)>0 %then %let numppg = &dummyv ; %if &tabltype=1betaOLS %then %do; %if &n_tols<=2 and &n_sdxs<=2 %then %let numppg = %eval(&n_tols * &n_sdxs); %else %let numppg=&n_sdxs; %end; %put ; %put *** determination of number of plots per page & ; %put *** min & max values to determine axes ; %let numppg=%cmpres(&numppg); %put *** ==> numppg: &numppg ; %put *** ==> minyval: &minyval ; %put *** ==> numtails: &numtails ; *----------------------------------------------------------------------*; ** III.e.1 ; ** determine axes for analysis problem to determine Power ** from provided sample sizes ; %if &resltvar=power %then %do; %let maxyval = 1.0 ; %let incr = 0.1 ; %let ylabl = %str('Power') ; %let xlabl = %str('Total Sample Size') ; %end; %if &resltvar=power and &probtype=McNemar %then %do; %let xlabl = %str('Total Number of Pairs') ; %end; *----------------------------------------------------------------------*; ** III.e.2 ; ** determine axes for analysis problem to determine Sample Size ** from provided Powers ; %if &resltvar=NTotal %then %do; %let ylabl = %str(justify=r 'Total' justify=r 'Sample Size') ; %if &probtype=McNemar %then %do; %let ylabl = %str(justify=r 'Total' justify=r '# of Pairs') ; %end; %let xlabl = %str('Power') ; %do; data _null_; ** create yaxis values ranging from 90% of the min-y to 110% of the ** max-y values, 10% outside of actual data range (for Ntotal) ; ymax=&maxyval * 1.1 ; ymin=&minyval * 0.9 ; ** determine axis increment dependent on actual data range ; if 0<= ymax-ymin < 60 then incr = 5 ; else if 60<= ymax-ymin < 120 then incr = 10 ; else if 120<= ymax-ymin < 240 then incr = 20 ; else if 240<= ymax-ymin < 300 then incr = 25 ; else if 300<= ymax-ymin < 600 then incr = 50 ; else if 600<= ymax-ymin < 1200 then incr = 100 ; else if 1200<= ymax-ymin < 1800 then incr = 150 ; else if 1800<= ymax-ymin < 2400 then incr = 200 ; else if 2400<= ymax-ymin < 3000 then incr = 250 ; else if 3000<= ymax-ymin < 3600 then incr = 300 ; else if 3600<= ymax-ymin < 6000 then incr = 500 ; else if ymax-ymin >= 6000 then incr = 1000 ; ** set graph min/max values at even multiples of the incrementing value ; newmax = ceil(ymax/incr)*incr; newmin = floor(ymin/incr)*incr; call symput( 'incr', trim(left(incr)) ); call symput( 'maxyval', trim(left(newmax)) ); call symput( 'minyval', trim(left(newmin)) ); %end; * end data _null_ do loop ; %end; * end resltvar=Ntotal do loop ; *----------------------------------------------------------------------*; ** III.f ; %put ; %put *** Axes for plots, based on results per problem type ; %put *** ==> minyval: &minyval ; %put *** ==> maxyval: &maxyval ; %put ; ** step needs to be _after_ loops that determine ** axis values & default labels, to overwrite the default values ** ** redefine axis labels if specifically requested in macro call ; %put *** x & y axes labels, if requested non-default labels ; %put r_xlabl: &r_xlabl ; %put r_ylabl: &r_ylabl ; %if %length(&r_xlabl)>0 %then %do; %let xlabl=&r_xlabl; %end; %if %length(&r_ylabl)>0 %then %do; %let ylabl=&r_ylabl; %let angl=%str(0 a=90); %end; %if %length(&r_ylabl)=0 %then %do; %let angl=0; %end; ** offset top of y-axis to accommodate note statements ; * default: 5pct ; %let offset2=%str(5pct); %if %length(&bynote_2)>0 %then %do; %let offset2=%str(7pct); %end; %if &numppg>=3 and %length(&r_titl1)>0 %then %do; %let r_size1=1.2; %let r_size2=1.0; %if %length(&r_titl1)>0 %then %let r_titl1=%str(title1 h=&r_size1 c=black "&titl1";) ; %if %length(&r_titl2)>0 %then %let r_titl2=%str(title2 h=&r_size2 c=black "&titl2";) ; %if %length(&r_titl3)>0 %then %let r_titl3=%str(title3 h=&r_size2 c=black "&titl3";) ; %if %length(&r_titl4)>0 %then %let r_titl4=%str(title4 h=&r_size2 c=black "&titl4";) ; %end; *----------------------------------------------------------------------*; ** III.g ; symbol1 v=dot i=join l=1 c=black h=1.4; symbol2 v=circle i=join l=2 c=black h=1.4; symbol3 v=diamond i=join l=3 c=black h=1.4; symbol4 v=square i=join l=4 c=black h=1.4; symbol5 font=marker v=U i=join l=5 c=black h=1.4; legend1 label=none; goptions gsfname=; &suppr_by; * font=triplex serif bold for titles/labels * font=duplex serif for value labels/annotate ; *----------------------------------------------------------------------*; ** III.h ; goptions goutmode=replace; %if &numtails = 1 or &numtails = 3 %then %do; ** run gplot for plts1 temp plot file if tails=1 or tails=1,2 ; proc gplot data=dset uniform gout=plts1 ; by &bystmt ; where tails=1 &whstmt ; plot &yaxis * &xaxis = &grfgrp / annotate=annoinfo nolegend &frame hminor=0 haxis=axis1 vaxis=axis2 vminor=4 ; axis1 order=(&axisvals) offset=(15pct,5pct) label=(&xlabl); axis2 offset=(3pct,&offset2) label=(r=&angl &ylabl) order=(&minyval to &maxyval by &incr); label alpha=' Alpha' testtype='00'x effctitl='00'x sdmult=' SD Multiplier' probstmt='True State' nullvalu='Delta' ; %end; ** end numtails = 1,3 loop for gplot ; %if &numtails = 2 or &numtails = 3 %then %do; ** run gplot for plts2 temp plot file if tails=2 or tails=1,2 ; proc gplot data=dset uniform gout=plts2 ; by &bystmt ; where tails=2 &whstmt ; plot &yaxis * &xaxis = &grfgrp / annotate=annoinfo nolegend &frame hminor=0 haxis=axis1 vaxis=axis2 vminor=4 ; axis1 order=(&axisvals) offset=(15pct,5pct) label=(&xlabl); axis2 offset=(3pct,&offset2) label=(r=&angl &ylabl) order=(&minyval to &maxyval by &incr); label alpha=' Alpha' testtype='00'x effctitl='00'x sdmult=' SD Multiplier' probstmt='True State' nullvalu='Delta' ; %end; ** end numtails = 2,3 loop for gplot ; run; %put *** ; %put *** Reiteration of plot output specifications ; %put *** ==> routing output to = &where ; %put *** ==> default/specified device to = &grphtype ; %put *** ==> gsf device name = &devicenm ; %put *** ==> device for screen output = &deviceis ; %put *** ==> graph output file is = &graf_plt ; goptions goutmode=append; %let addtitle= ; %if %length(&r_titl1)>0 %then %do; %let addtitle=%str(10:GSLIDE) ; proc gslide gout=plts1 ; &r_titl1 &r_titl2 &r_titl3 &r_titl4 ; proc gslide gout=plts2 ; &r_titl1 &r_titl2 &r_titl3 &r_titl4 ; %end; %put *** chk font size change for r_titl1: &r_titl1 ; &probchk options mprint; ************************************************************************ ** ** Section IV -- create templates for Greplay and execute runs ** for UnifyPow results ** ************************************************************************ ; *----------------------------------------------------------------------*; ** IV.a ; goptions gsfname=&graf_plt gsfmode=&replace device=&devicenm rotate=landscape &prompt &display ; *** define plot templates for GREPLAY procedure of graphics output file *** from GPLOT runs for 1-tail and 2-tail problem types ; %let plt2=%str( tdef plt2 des='Two plots' 1/llx=0 lly=25 ulx=0 uly=75 urx=50 ury=75 lrx=50 lry=25 2/llx=50 lly=25 ulx=50 uly=75 urx=100 ury=75 lrx=100 lry=25 10/llx=0 lly=15 ulx=0 uly=90 urx=100 ury=90 lrx=100 lry=15 ; ) ; %let plt3=%str( tdef plt3 des='Three plots' 1/llx=0 lly=52 ulx=0 uly=100 urx=50 ury=100 lrx=50 lry=52 2/llx=50 lly=52 ulx=50 uly=100 urx=100 ury=100 lrx=100 lry=52 3/llx=25 lly=0 ulx=25 uly=48 urx=75 ury=48 lrx=75 lry=0 10/llx=0 lly=0 ulx=0 uly=100 urx=100 ury=100 lrx=100 lry=0 ; ) ; %let plt4=%str( tdef plt4 des='Four plots' 1/llx=0 lly=52 ulx=0 uly=100 urx=50 ury=100 lrx=50 lry=50 2/llx=50 lly=52 ulx=50 uly=100 urx=100 ury=100 lrx=100 lry=50 3/llx=0 lly=0 ulx=0 uly=48 urx=50 ury=48 lrx=50 lry=0 4/llx=50 lly=0 ulx=50 uly=48 urx=100 ury=48 lrx=100 lry=0 10/llx=0 lly=0 ulx=0 uly=100 urx=100 ury=100 lrx=100 lry=0 ;) ; %let plt1=%str( tdef plt1 des='Single plots reduced' 1/llx=20 lly=20 ulx=20 uly=80 urx=80 ury=80 lrx=80 lry=20 10/llx=10 lly=10 ulx=10 uly=90 urx=90 ury=90 lrx=90 lry=10 ;) ; *----------------------------------------------------------------------*; %if %length(&r_titl1)>0 %then %do; ** need to allow for space for title statements ** for 3 & 4 plots per page layouts ; %let plt3=%str( tdef plt3 des='Three plots' 1/llx=0 lly=48 ulx=0 uly=93 urx=50 ury=93 lrx=50 lry=48 2/llx=50 lly=48 ulx=50 uly=93 urx=100 ury=93 lrx=100 lry=48 3/llx=25 lly=0 ulx=25 uly=45 urx=75 ury=45 lrx=75 lry=0 10/llx=0 lly=0 ulx=0 uly=100 urx=100 ury=100 lrx=100 lry=0 ; ) ; %let plt4=%str( tdef plt4 des='Four plots' 1/llx=0 lly=50 ulx=0 uly=95 urx=50 ury=95 lrx=50 lry=50 2/llx=50 lly=50 ulx=50 uly=95 urx=100 ury=95 lrx=100 lry=50 3/llx=0 lly=0 ulx=0 uly=45 urx=50 ury=45 lrx=50 lry=0 4/llx=50 lly=0 ulx=50 uly=45 urx=100 ury=45 lrx=100 lry=0 10/llx=0 lly=0 ulx=0 uly=100 urx=100 ury=100 lrx=100 lry=0 ;) ; %end; *----------------------------------------------------------------------*; proc sql; select count(*) into :gslide1 from sashelp.vcatalg where libname="WORK" and memname="PLTS1" and substr(objname,1,5)="GPLOT"; select count(*) into :gslide2 from sashelp.vcatalg where libname="WORK" and memname="PLTS2" and substr(objname,1,5)="GPLOT"; *----------------------------------------------------------------------*; ** IV.b ; %if &numtails = 1 or &numtails = 3 %then %do; ** run greplay for plts1 temp plot file if tails=1 or tails=1,2 ; &probchk options mlogic mprint ; proc greplay igout=plts1 tc=tempcat nofs ; &&plt&numppg ; template plt&numppg ; device &devicenm ; %put *** *** running greplay on plts1 data ; %if &numppg = 1 %then %do; treplay 1:GPLOT &addtitle ; %if &gslide1>1 %then %do i = 1 %to %eval(&gslide1-1) %by 1; treplay 1:GPLOT&i &addtitle ; %end; %end; %else %if &numppg = 2 %then %do; treplay 1:GPLOT 2:GPLOT1 &addtitle ; %if &gslide1>2 %then %do i = 2 %to %eval(&gslide1-2) %by 2; %let ii=%eval(&i+1); treplay 1:GPLOT&i 2:GPLOT&ii &addtitle ; %end; %end; %else %if &numppg = 3 %then %do; treplay 1:GPLOT 2:GPLOT1 3:GPLOT2 &addtitle ; %if &gslide1>3 %then %do i = 3 %to %eval(&gslide1-3) %by 3; %let ii=%eval(&i+1); %let iii=%eval(&i+2); treplay 1:GPLOT&i 2:GPLOT&ii 3:GPLOT&iii &addtitle ; %end; %end; %else %if &numppg = 4 %then %do; treplay 1:GPLOT 2:GPLOT1 3:GPLOT2 4:GPLOT3 &addtitle ; %if &gslide2>4 %then %do i = 4 %to %eval(&gslide2-4) %by 4; %let ii=%eval(&i+1); %let iii=%eval(&i+2); %let iv=%eval(&i+3); treplay 1:GPLOT&i 2:GPLOT&ii 3:GPLOT&iii 4:GPLOT&iv &addtitle ; %end; %end; end; run; %end; ** end numtails = 1,3 for greplay ; *----------------------------------------------------------------------*; ** IV.c ; %if &numtails = 3 %then %do; goptions gsfmode=append; %end; %if &numtails = 2 or &numtails = 3 %then %do; ** run greplay for plts2 temp plot file if tails=2 or tails=1,2 ; proc greplay igout=plts2 tc=tempcat nofs ; &&plt&numppg ; template plt&numppg ; device &devicenm ; %put *** *** running greplay on plts2 data ; %if &numppg = 1 %then %do; treplay 1:GPLOT &addtitle ; %if &gslide1>1 %then %do i = 1 %to %eval(&gslide1-1) %by 1; treplay 1:GPLOT&i &addtitle ; %end; %end; %else %if &numppg = 2 %then %do; treplay 1:GPLOT 2:GPLOT1 &addtitle ; %if &gslide1>2 %then %do i = 2 %to %eval(&gslide1-2) %by 2; %let ii=%eval(&i+1); treplay 1:GPLOT&i 2:GPLOT&ii &addtitle ; %end; %end; %else %if &numppg = 3 %then %do; treplay 1:GPLOT 2:GPLOT1 3:GPLOT2 &addtitle ; %if &gslide1>3 %then %do i = 3 %to %eval(&gslide1-3) %by 3; %let ii=%eval(&i+1); %let iii=%eval(&i+2); treplay 1:GPLOT&i 2:GPLOT&ii 3:GPLOT&iii &addtitle ; %end; %end; %else %if &numppg = 4 %then %do; treplay 1:GPLOT 2:GPLOT1 3:GPLOT2 4:GPLOT3 &addtitle ; %if &gslide2>4 %then %do i = 4 %to %eval(&gslide2-4) %by 4; %let ii=%eval(&i+1); %let iii=%eval(&i+2); %let iv=%eval(&i+3); treplay 1:GPLOT&i 2:GPLOT&ii 3:GPLOT&iii 4:GPLOT&iv &addtitle ; %end; %end; end; run; options nomprint nomlogic ; %end; ** end numtails = 2,3 for greplay ; footnote ; ************************************************************************* ************************************************************************* ** END graphics module for UnifyPow program ************************************************************************* ************************************************************************* ; %end; %else %do; %put ; %put *** *** USER ENVIRONMENT ERROR *** *** ; %put ** SAS/Graph IS NOT INSTALLED ON THIS SYSTEM ; %put ** ; %put ** SAS/Graph Needs to be Installed for the ; %put ** Graphics Module to display the plots of ; %put ** the UnifyPow results ; %put ***********************************************; %end; * SAS/Graph product loop ; %end; * end get =0 loop ; %end; * end UnifyPow execution check loop ; %mend; * graphs loop ;