Free Essay

Sas Procedures

In:

Submitted By drsankalp
Words 7726
Pages 31
SAS Global Forum 2009

Pharma, Life Sciences and Healthcare

Paper 174-2009

Clinical Trial Reporting Using SAS/GRAPH® SG Procedures Susan Schwartz, SAS Institute Inc., Cary, NC
ABSTRACT
Graphics are a powerful way to display clinical trial data. By their very nature, clinical trials generate a large amount of information, and a concise visual presentation of the results is essential. Information about the patient population, drug dosages, clinical responses, and adverse events must be clear. Clinical laboratory results need to be presented within the context of acceptable limits, and subtle changes over time must be highlighted. This presentation will show, by example, how such graphs can easily be created using the SAS/GRAPH® SG procedures. The techniques that will be emphasized in this presentation include: • • • • • • Creation of a dose response plot by overlaying multiple plots in one graph Construction of a hematology panel using treatment regimen and visit numbers as the classification variables Presentation of a matrix of liver function tests (LFTs) for at-risk patients Aggregation of data into on-the-fly classification variables using user-defined formats Getting the axis you want using built-in best fit algorithms Generation of publication-ready graphs in color and in black and white

INTRODUCTION
The new SAS/GRAPH procedures—SGPLOT, SGPANEL, and SGSCATTER—provide new tools for viewing and reporting data collected during clinical trials. The SG procedures are an extension of the ODS Graphics framework, providing access to the Graph Template Language (GTL) in the familiar syntax of the SAS/GRAPH procedure. The concept behind the SG procedures is simple in theory, yet powerful in execution. Each GRAPH contains one or more CELLS, and each CELL contains one or more overlaid PLOTS. Both the GRAPH and CELL can contain supporting elements such as titles and legends. This paper highlights how to create single-cell and multi-cell graphs using examples commonly encountered in the reporting and analysis of clinical trial data. The output you can produce is limited only by your imagination. Unless otherwise noted, all graphs in this paper were produced with the ODS LISTING style.

SINGLE-CELL GRAPHS
THE SGPLOT PROCEDURE
Single-cell graphs are produced by the SGPLOT procedure. Figure 1 shows a simple dose response plot that displays the mean clinical response of two treatment groups over a 10-day study. The SGPLOT procedure’s cell is a composite of one PLOT statement and two supporting elements. The input data set contains three numeric variables: response visit 9.40 0 9.35 1 ..... etc trt 1 1

• •

The PROC FORMAT step defines two user-defined formats, VISITFMT and TRTFMT, and the FORMAT statement associates the user-defined formats with their (numeric) variables. The SERIES statement produces a grouped series plot with marker symbols. The plot's colors, marker symbols, and line patterns are assigned automatically from the style elements GRAPHDATA1 through GRAPHDATAn. The REFLINE statement draws a reference line at X=1 to indicate day one of treatment.



1

SAS Global Forum 2009

Pharma, Life Sciences and Healthcare



The options in the KEYLEGEND statement position the legend in the upper-right, inside corner of the plot. By default, a legend is generated for grouped data, but it is placed at the bottom, outside of the plot area. The options in the KEYLEGEND statement customize the placement. The X and Y axes are drawn and labeled automatically. proc format; value visitfmt 0 = "Baseline" 1 = "Day 1" .. formats for "Day 2" to "Day 10" ; value trtfmt 1 = "Super Drug" 2 = "Old Drug"; run; proc sgplot data=response; format visit visitfmt. trt trtfmt.; series x=visit y=response / group=trt markers; refline 1 / axis=x; keylegend / position=topright across=1 1ocation=inside; xaxis grid; yaxis grid; run;



Figure 1. Dose Response Plot
Figure 2 shows another example of a straightforward single-cell plot that conveys a lot of information with a minimum amount of code. • • • The input data set is sorted in descending order by the response variable (DEATHS). The DOT plot displays the number of deaths by the category (CAUSE-OF-DEATH) The YAXIS statement DISCRETEORDER=DATA option stipulates that the category values be drawn as they appear in the data set. (The other choices for discrete axis order are FORMATTED and UNFORMATTED). Because the data set is in descending order by deaths, the effect is that of a waterfall showing the relative magnitude of cancer deaths in 2007. The XAXIS statement overrides the label of the variable DEATHS. proc sort data=cancer; by descending deaths; run; proc sgplot data=cancer; dot cause / response=deaths; yaxis discreteorder=data display=(nolabel); xaxis label='Number of Deaths'; run;



Figure 2. Cancer Mortality Plot

2

SAS Global Forum 2009

Pharma, Life Sciences and Healthcare

Figure 3 shows how the SGPLOT procedure can create a more complex single-cell plot that displays a Plasma Concentration Profile. The input data set contains the variables and values as shown. Note that only TIME and CONC are valued on every observation. The remaining variables are valued only on the first observation and have been added to the data set for the vector plots. time conc vx 0.25 0.00 3.5 0.25 1.00 . 0.50 3.50 . etc......... vy 3 . . vlabel AUC = 12.03 vx2 5 . . vy2 6.76 . . vlabel2 Cmax=6.76 vx3 0.75 . . vy3 8 . . vlabel3 Tmax=0.75

• •

The NOAUTOLEGEND option in PROC SGPLOT suppresses the legend. The BAND statement draws the solid blue area, with X=TIME and Y=0 to the CONC value. Thus, the band draws from X=.25, Y=(0 to 0), and then X=.25, Y=(0 to 1.0), and so on. The band represents the Area Under the Curve (AUC) value. The SERIES statement draws with X=TIME and Y=CONC, which is also the upper Y value of the BAND. Thus, the series is overlaid on the upper boundary of the band. By default, the marker symbols would inherit their attributes from the element GRAPHDATAdefault. Because this is also the default color of the BAND’s fill color, the markers are assigned to GRAPHDATA1 to create a contrast. The series markers indicate the plasma concentrations at 30-minute intervals (for the first three hours), one-hour interval (at hour 4), and two-hour intervals (at hours 6 and 8). The XAXIS statement specifies the label and shifts the cell contents slightly to the left (OFFSET=0). The YAXIS statement specifies the label and again shifts the cell contents along the Y axis. The first VECTOR statement draws the arrowed line from (2, 1.5) to (vx, vy), and adds the label from VLABEL. The second VECTOR statement draws the horizontal line at Y=6.76, and adds the label from VLABEL2. The third VECTOR statement draws the vertical line at X=0.75, and adds the label from VLABEL3. proc sgplot data=pk noautolegend; band x=time lower=0 upper=conc; series x=time y=conc / markers markerattrs=graphdata1 (symbol=circlefilled); xaxis offsetmin=0 label='Time relative to dose (hours)'; yaxis max=8.0 offsetmin=0 label='Plasma concentration [ng/mL]'; vector x=vx y=vy / xorigin=2 yorigin=1.5 lineattrs=(color=black) datalabel=vlabel arrowshape=filled; vector x=vx2 y=vy2 / xorigin=0 yorigin=6.76 lineattrs= (pattern=mediumdash color=black) datalabel=vlabel2 noarrowheads; vector x=vx3 y=vy3 / xorigin=.75 yorigin=0 lineattrs= (pattern=shortdash color=black) datalabel=vlabel3 noarrowheads; run;



• • • • •

Figure 3. Plasma Concentration Profile
Figure 4 demonstrates how to use the SGPLOT procedure to display the results of a placebo-controlled double-blind trial with a three-week washout period. Note that the BAND is drawn first so that it is underneath the remainder of the PLOTS.

3

SAS Global Forum 2009

Pharma, Life Sciences and Healthcare



The BAND draws with LOWER=12.1, UPPER=15, and Y=(0 to X1). X1 is set to 15 in the data set, so this has the effect of drawing a band from X=(12.1 to 15) and Y=(0 to 15). GRAPHDATA1 is the first group color, so the band will have the same fill color (blue, in this case) as the Placebo group, but with a lighter saturation. The band is used to highlight the study’s washout period, weeks 12 to 15. The SCATTER statement draws the grouped markers (filled circles) with lower and upper error bars, with all other attributes from the GRAPHDATA1 through GRAPHDATA3 elements. The scatter plot displays each treatment group’s mean percent change at three-week intervals, from week 0 to week 15. The first SERIES statement connects the markers in the SCATTER plot using the same group colors. The second SERIES statement draws the markers and series for the three-week washout period only. A dash is used to connect the markers. Again, the same group colors are applied by default. The XAXIS and YAXIS labels are specified and the XAXIS tick values are set manually. The first REFLINE statement draws a horizontal line at Y=0, and represents a zero percent change from the baseline. The second REFLINE statement specifies a line at X=13.5, which is the middle of the washout period. The line does not actually draw because the line thickness is set to 0. This is a trick to place the text “|--Washout--|” centered in the middle of the washout block. The KEYLEGEND statement draws a borderless legend from the SCATTER group values.



• • • • •



proc sgplot data=response; band y=x1 lower=12.1 upper=15 / transparency=.8 fillattrs=graphdata1; scatter x=week y=perc / group=trt yerrorlower=lo yerrorupper=hi markerattrs=(symbol=circlefilled) name="scat"; series x=week y=perc / group=trt lineattrs=(pattern=solid); series x=week y=end / group=trt lineattrs=(pattern=shortdash) markers markerattrs=(symbol=circle); xaxis integer values=(0 to 15 by 3) label="Weeks in Treatment"; yaxis label="Percent Change"; refline 0; refline 13.5 / axis=x label="|-- Washout --|" labelloc=outside labelpos=min lineattrs=(thickness=0px); keylegend "scat" / title="" noborder; run;

Figure 4. Mean Percent Change from Baseline
Figure 5 demonstrates the use of a built-in statistical function in an SG procedure. The input data set contains these values: c500 t500 c100 10% 5% 12% 20% 7% 20% 30% 9% 30% etc......... t100 10% 12% 17% c50 18% 20% 30% t50 18% 19% 22% c25 . . 30% t25 . . 29%

• •

The ODS escape character is set to ~. The default value is {ESC}—this will be used later in the code to draw Unicode glyphs for the alpha, beta, and delta characters. The NOAUTOLEGEND option suppresses the automatic legend.

4

SAS Global Forum 2009

Pharma, Life Sciences and Healthcare

• •

The first REG statement draws the bottom curve and labels it N=500. The next three REG statements draw the other three curves and label them. Because there is more than one REG statement, PROC SGPLOT assigns each REG statement the attributes from the next unused GRAPHDATAn element. Thus, the procedure “cycles” through GRAPHDATA1 through GRAPHDATA4. This behavior can be changed with the NOCYCLEATTRS option. The REFLINE statement draws a reference line at X=.5, indicating a response rate in the control group equal to 50%. The XAXIS statement specifies the axis label, tick values, and vertical grid lines. The YAXIS statement specifies the axis label, tick values, and horizontal grid lines. The ~ is the ODS escape character, which provides access to the Unicode inline formatting of Unicode glyphs. The {UNICODE DELTA_U} draws the uppercase delta. See the SAS/GRAPH 9.2: Graph Template Language User's Guide for more information about Unicode glyphs in GTL and the SG procedures.

• • •



The INSET statement draws the label value pairs for the α=5% and β=20% inset box. It is drawn in the topright corner of the plot without a border. ods escapechar='~'; proc sgplot data=txsize noautolegend; reg x=c500 y=t500 / curvelabel="n=500" curvelabelpos=max degree=2 nomarkers lineattrs=(thickness=2px pattern=solid); reg x=c100 y=t100 / curvelabel="n=100" curvelabelpos=max degree=2 nomarkers lineattrs=(thickness=2px pattern=solid); reg x=c50 y=t50 / curvelabel="n=50" curvelabelpos=max degree=2 nomarkers lineattrs=(thickness=2px pattern=solid); reg x=c25 y=t25 / curvelabel="n=25" curvelabelpos=max degree=2 nomarkers lineattrs=(thickness=2px pattern=solid); refline .5 /axis=x transparency=.5; xaxis label='Response rate in the control group' values=(0.0 to 1.0 by .1) grid; yaxis label='Anticipated smallest treatment effect (~{unicode delta_u} vs control)' min=0.0 max=.5 grid; inset ("~{unicode alpha} ="="5%" "~{unicode beta} ="="20%") / position=topright noborder textattrs=graphtitletext; run;

Figure 5. Clinical Study Design Plot

MULTI-CELL GRAPHS
THE SGPANEL PROCEDURE
The SGPANEL procedure creates a panel of single-cell plots within one or more classification variables. Panels can be arranged in a grid, in a series of cells, in a single column, or in a single row. The panel type is specified by the LAYOUT= option in the PANELBY statement. The axis data ranges can be set as uniform across all columns, across all rows, or across both (the default). PROC SGPANEL determines the axis ranges before it draws any panels, thus assuring uniformity across all panels.

5

SAS Global Forum 2009

Pharma, Life Sciences and Healthcare

Figure 6 displays a basic panel of trial demographics, arranged in a LATTICE layout. • • • There are two PANELBY variables, the first for the column (GENDER) and the second for the row (RACE). Each cell contains an HBOX (horizontal box plot) of AGE (the response) by TRT (the category). The DATALABEL option displays the value of each outlier. The ROWAXIS statement suppresses display of the row label. proc sgpanel data=demog; panelby gender race / layout=lattice; hbox age / category=trt datalabel; rowaxis display=(nolabel); run;

Figure 6. Demographic Profile in a LATTICE Layout
Figure 7 displays the same demographic information, but in a PANEL layout. • • • • The classification values appear in one series of cells, ordered by GENDER, then RACE. The COLUMNS=4 option explicitly requests that all four cells appear in one row. The ONEPANEL option would do the same thing. (See Figure 9.) Each cell contains an HBOX (horizontal box plot), this time without the DATALABEL option. The ROWAXIS statement suppresses display of the row label. proc sgpanel data=demog; panelby gender race / layout=panel columns=4; hbox age / category=trt; rowaxis display=(nolabel); run;

Figure 7. Demographic Profile in a PANEL Layout

6

SAS Global Forum 2009

Pharma, Life Sciences and Healthcare

Figure 8 displays a comparison of the raw and weighted p-values in a clinical trial that has both primary and secondary endpoints. The results are arranged in a COLUMNLATTICE layout. • There is only one classification variable, TRT. The NOVARNAME option suppresses display of the text “TRT=” in the cell header.

The contents of each cell are then specified: • • • • The first SERIES statement draws the plot of the raw p-values. The second SERIES statement draws the plot of the weight-adjusted p-values. The ROWAXIS and COLAXIS statements specify the labels of the row (Y) and column (X) axes. The REFLINE statement draws a horizontal line at Y=.05 (to indicate 95% confidence). proc sgpanel data=hyp; panelby trt / novarname layout=columnlattice; series x=hyp y=rawp / markers markerattrs=(size=6pt); series x=hyp y=adjp / markers markerattrs=(size=6pt symbol=square); rowaxis label='P-value'; colaxis label='Hypothesis'; refline 0.05 / lineattrs=(pattern=shortdash); run;

Figure 8. Comparison of p-values in a COLUMNLATTICE Layout
Finally, figure 9 displays an HBAR (horizontal bar chart), arranged in a ROWLATTICE layout. • The PANELBY statement contains one classification variable, SEX. The NOVARNAME option suppresses the variable name in the cell header, and the ONEPANEL option forces all cells to appear in one panel. Specifying UNISCALE=COLUMN forces common data values in the column (X) axis, but not in the row (Y) axis. The HBAR requests a bar chart of CASES (response) by CAUSE (category), with the response values summed by category. Just as in figure 2, the input data set has been sorted in descending order by the response variable (CASES). The ROWAXIS statement DISCRETEORDER=DATA option forces the category values to be drawn as they appear in the data set. As before, this creates the effect of a waterfall showing the relative number of cancer diagnoses. This time, the effect is shown independently for each sex because it is used with the SGPANEL procedure, not the SGPLOT procedure. The UNISCALE=COLUMN option prevents a PROSTATE category in the FEMALE row, and prevents an OVARIAN category in the MALE row.

• •



7

SAS Global Forum 2009

Pharma, Life Sciences and Healthcare

proc sgpanel data=cancer; panelby sex / layout=rowlattice onepanel novarname uniscale=column; hbar cause / response=cases stat=sum; rowaxis discreteorder=data display=(nolabel); colaxis display=(nolabel); run;

Figure 9. Horizontal Bar Chart in a ROWLATTICE Layout THE SGSCATTER PROCEDURE
The SGSCATTER procedure creates a panel of one or more scatter plots. The scatter plots can be displayed individually or in a matrix. PROC SGSCATTER offers three different types of panels: • • • a paneled graph of scatter plots where each plot cell has its own independent set of axes an MxN rectangular matrix, in which all cells in a row have the same (row) axis values, and all cells in a column have the same (column) axis values a scatter plot matrix, in which each of the variables is plotted against the others

Figure 10 shows a paneled graph of independent scatter plots. • The variables WEIGHT, CHOLESTEROL, SYSTOLIC, and DIASTOLIC are the independent variables, the variable AGEATDEATH is the dependent variable, and the variable SMOKING is the group. Two columns are requested.

The result is four scatter plots of 1) WEIGHT x AGEATDEATH, 2) CHOLESTEROL x AGEATDEATH, 3) SYSTOLIC x AGEATDEATH, and 4) DIASTOLIC x AGEATDEATH. The group legend is displayed automatically.

8

SAS Global Forum 2009

Pharma, Life Sciences and Healthcare

proc sgscatter data=heart; plot (weight cholesterol systolic diastolic) * (ageatdeath) / group=smoking columns=2 markerattrs=(size=10 symbol=circle) legend=(notitle); run;

Figure 10. Paneled Graph of Independent Scatter Plots
By contrast, Figure 11 shows a scatter plot matrix. • • • The rows and columns of the matrix contain the variables SYSTOLIC, DIASTOLIC, and CHOLESTEROL. Each scatter plot is overlaid with a 95% confidence ellipse of the predicted value. Each diagonal contains a histogram and normal density curve of its corresponding variable.

proc sgscatter data= heart; matrix systolic diastolic cholesterol/ ellipse=(alpha=0.05 type=predicted) diagonal=(histogram normal); run;

Figure 11. Scatter Plot Matrix

LABORATORY PANELS
There are several ways to construct multi-cell graphs using the SGPANEL and SGSCATTER procedures. This section demonstrates how to use these tools to construct panels of laboratory results. All laboratory panels in this section (figures 12 through 14) were generated with the STATISTICAL style. Figure 12 demonstrates how to generate a high-level overview of the White Blood Count (WBC) results for all patients during a six-week clinical trial. The input data set contains these values:

9

SAS Global Forum 2009

Pharma, Life Sciences and Healthcare

Testname Numlow Neutrophils (%) 40.5 Lymphocytes (%) 15.4 etc.........

Numhi 75.0 48.5

Result 48.60 41.60

Visitnum PreRx PreRx

PatID 102 102

Panel Hematology Hematology

Note that each observation contains the appropriate high and low values of its normal range. • There is one PANELBY variable, LINE. LINE was obtained from the original test name and contains a number from 1 to 6. LINE is used to control the order of the laboratory test names in the panel. A format has been applied to transform LINE back to the original test name. The PANELBY statement specifies the NOVARNAME and ONEPANEL options. The UNISCALE=COLUMN option requests common data values on the column (X) axis, but not on the row (Y) axis.

The contents of each cell are then specified: • The first REFLINE statement draws a horizontal line for the low normal range, with Y=NUMLOW, as specified in the data set. The NOCLIP option protects against the situation in which the low normal range is outside the range of all data values. Specifying NOCLIP forces the data range to expand, if necessary, to retain the reference line. The second REFLINE statement draws a horizontal line for the high normal range, with Y=NUMHI, as specified in the data set. The NOCLIP option is specified. The SCATTER statement draws one marker for each X=VISITNUM and Y=RESULT. The ROWAXIS statement turns off the row (Y axis) label, tick marks, and tick values. The COLAXIS statement turns off the column (X axis) label, and sets the OFFSETMAX option to 0.1. This has the effect of moving the columns slightly to the left and creating more space for the REFLINE labels.

• • • •

ods listing style=statistical; proc sgpanel data=labs; panelby line / onepanel uniscale=column novarname layout=rowlattice; refline numlow / label noclip; refline numhi / label noclip; scatter x=visitnum y=result / markerattrs=(symbol=asterisk size=10); rowaxis display=(nolabel novalues noticks); colaxis offsetmax=0.1 display=(nolabel); run;

Figure 12. Laboratory Panel of WBC Results
Figure 13 shows how to construct a panel of Liver Function Tests (LFTs), comparing each patient’s pretreatment value with their one week, three-month, and 6-month results. Instead of displaying actual laboratory results, the panel displays the results as the ratio of the Upper Limit of Normal (ULN). The input data set contains these values:

10

SAS Global Forum 2009

Pharma, Life Sciences and Healthcare

Visitnum Labtest 1 Week ALAT 1 Week Bilirubin Total etc.........

Drug Drug A (n=240) Drug A (n=240)

Pre 0.27216 1.28536

Result 0.64893 0.54600



There are two PANELBY variables, LABTEST and VISITNUM. The PANELBY statement specifies the NOVARNAME and ONEPANEL options and a LATTICE layout. Thus, each column contains one of the four LFTs, each row contains one of the study’s three visits, and each cell contains each patient’s baseline by visit results.

The contents of each cell are then specified: • The SCATTER statement draws a marker for each X=PRE and Y=RESULT pair. The group is set to the DRUG (treatment group) variable. The markers use the attributes of the GRAPHDATA1 and GRAPHDATA2 elements. The first REFLINE statement draws horizontal lines at Y=(1, 1.5, and 2) to indicate study values of 1 ULN, 1.5 ULN, and 2 ULN. The second REFLINE statement draws vertical lines at X=(1, 1.5, and 2) to indicate baseline values of 1 ULN, 1.5 ULN, and 2 ULN. The ROWAXIS and COLAXIS values are explicitly set to be integers from 0 to 4. The group KEYLEGEND is drawn without a border and displays at the bottom by default. ods listing style=statistical; proc sgpanel data=labs; panelby labtest visitnum / onepanel novarname layout=lattice; scatter x=pre y=result/ group=drug; refline 1 1.5 2 / axis=Y lineattrs=(pattern=dash); refline 1 1.5 2 / axis=X lineattrs=(pattern=dash); rowaxis integer min=0 max=4 label='Study (/ULN)'; colaxis integer min=0 max=4 label='Baseline (/ULN) *'; keylegend / title=" " noborder; run;

• • • •

Figure 13. Panel of LFT Results
Figure 14 also shows a panel of LFT results, but only for at-risk patients. The data values are the same as in figure 13, but the data set is organized differently:
Patient Patient 5152: White Male Age 48; Drug: A Patient 5152: White Male Age 48; Drug: A Patient 5152: White Male Age 48; Drug: A etc......... alat 0.50000 1.36533 2.18967 biltot 0.40000 0.64286 0.87118 alkph 0.40000 0.68972 0.97332 asat 0.50000 1.08498 1.64750 days -25 0 25 dval sdays . . -0.5 0 -0.5 25



There is one PANELBY variable, PATIENT, and the NOVARNAME option is used. LAYOUT= is not specified, so the default PANEL layout is used. Each cell displays one patient.

The contents of each cell contain: • • • The first SERIES statement draws the ALAT values with X=RELDAY and Y=ALAT. The next three SERIES statements draw the ASAT, ALKPHOS, and BILTOT values for each X=RELDAY and Y=<testname>. The BAND statement draws with X=(0 to SDAY) and Y=(MINY to 4.5), where both SDAY and MINY are defined in the data set. This has the effect of drawing a band from (X, Y)=(0, -.5) to (150, 4.5) in the first

11

SAS Global Forum 2009

Pharma, Life Sciences and Healthcare

cell. The band is different in the second cell because the SDAY values are different. The band represents the time that the patient remained in the trial. • • • • PROC SGPANEL draws the four SERIES statements with the attributes of GRAPHDATA1 through GRAPHDATA4, and the BAND with the attributes of GRAPHDATA5. The REFLINE statement draws horizontal lines at Y=(1, 1.5, and 2) to indicate LFT values of 1 ULN, 1.5 ULN, and 2 ULN. The COLAXIS minimum and maximum values are set explicitly. The legend for the four SERIES plots and the one BAND plot is automatic. ods listing style=statistical; proc sgpanel data=labs cycleattrs; panelby patient / novarname; series x=relday y=alat / markers lineattrs=(thickness=2px pattern=solid); series x=relday y=asat / markers lineattrs=(thickness=2px pattern=solid); series x=relday y=alkph / markers lineattrs=(thickness=2px pattern=solid) series x=relday y=biltot / markers lineattrs=(thickness=2px pattern=solid) band x=sday lower=miny upper=4.5 / transparency=0.8 legendlabel='Trial Duration'; refline 1 1.5 2 / axis=Y lineattrs=(pattern=dash); colaxis min=-50 max= 200; rowaxis label="Upper Limit Normal"; run;

Figure 14. Panel of LFT Results for At-Risk Patients

AGGREGATING FORMATS
The classification variables used in the previous PROC SGPANEL examples have all contained discrete values. You can create your own classification variables from continuous data by using user-defined formats to map continuous values into discrete buckets. This is referred to as creating classifiers on the fly. Figure 15 contains a LATTICE layout with two such variables, one for the column and one for the row. • • • PROC FORMAT creates user-defined formats for SMOKFMT (the column classifier) and DIASFMT (the row classifier). The FORMAT statement assigns the user-defined formats to the continuous variables. The PANELBY statement uses the formatted variables as the classifiers. Because the variable SMOKING contains missing values (that indicate non-smoker), the PANELBY statement contains the option MISSING so that the missing values are retained. The user-defined format puts these missing values in the NONSMOKER bucket. The PANELBY statement also specifies the NOVARNAME and ONEPANEL options.

The contents of each cell are then defined: • • a histogram of WEIGHT overlaid with a normal density curve a ROWAXIS statement with integer tick values and horizontal grid lines, and a COLAXIS statement with vertical grid lines

The user-defined classifiers are independent of each other. Every observation is assigned to one of the six (2x3) cells, and then the histogram and normal density curves are computed for the values assigned to the cells.

12

SAS Global Forum 2009

Pharma, Life Sciences and Healthcare

proc format; value smokfmt 1-999 = "Smoker" other = "Non-Smoker"; value diasfmt 0-90 = "Diastolic < 90 mmHg" 91-95 = "Diastolic 90 - 95 mmHg" 96-999 = "Diastolic > 95 mmHg"; run; ods listing style=statistical; proc sgpanel data=sashelp.heart; format smoking smokfmt. diastolic diasfmt.; panelby smoking diastolic / novarname missing onepanel layout=lattice; histogram weight; density weight; rowaxis integer grid; colaxis grid label='Weight (in pounds)'; run;

Figure 15. Two Aggregating Formats Used in a LATTICE Layout

GROUPED BAR CHARTS
Bar charts, especially grouped bar charts, are common in the reporting of clinical trial data. The SGPLOT and SGPANEL procedures contain several options that you can use to generate bar charts. Figures 16 through 18 were generated with the ANALYSIS style and use the same input data set, but assign the CATEGORY, RESPONSE, and GROUP variables differently. The input data set contains three variables with these values: trt pain Placebo 0 Placebo 1-2 Placebo 3-4 etc......... percent 12% 14% 16%

The variables are assigned as shown: Bar Chart Type Stacked Group Bar Chart Adjacent Group Bar Chart Latticed Group Bar Chart PANELBY — PAIN TRT CATEGORY TRT TRT PAIN RESPONSE PERCENT PERCENT PERCENT GROUP PAIN TRT TRT

STACKED GROUP BAR CHART
Figure 16 shows a stacked group bar chart, in which each group represents a proportionate share of the total. The bars change appearance for each group value, cycling through the GRAPHDATA1 to GRAPHDATA5 style elements. • • • The stacked bar chart is generated with the SGPLOT procedure. The VBAR (vertical bar chart) statement has CATEGORY=TRT, RESPONSE=PERCENT, and GROUP=PAIN. The XAXIS statement suppresses display of the X axis label, and the YAXIS statement explicitly sets the Y axis label.

13

SAS Global Forum 2009

Pharma, Life Sciences and Healthcare



The KEYLEGEND statement sets the legend title explicitly and displays a chicklet for each of the five group values. ods listing style=analysis; proc sgplot data=freq; vbar trt / response=percent group=pain; xaxis display=(nolabel); yaxis label='Cumulative Percent of Patients'; keylegend /position=bottom title="Pain Score"; run;

Figure 16. Stacked Group Bar Chart ADJACENT GROUP BAR CHART
Figure 17 shows an adjacent group bar chart. Each group value has its own column, with the categories within the group adjacent to each other. The bars change appearance for the two category values, cycling through the GRAPHDATA1 and GRAPHDATA2 style elements. • • • • • The adjacent group bar chart is generated with PROC SGPANEL. The PANELBY statement uses PAIN as the column variable, with the PAIN values displayed at the bottom of the column. The VBAR statement uses PERCENT as the response variable and TRT as both the category and the group variables. Using TRT as the group variable is done to cycle the group colors. The ROWAXIS statement draws horizontal grid lines and sets OFFSETMAX=.05. This adjusts the tick values down slightly and prevents clipping the top tick value. The COLAXIS statement suppresses display of the column axis label, tick marks, and values. If present, they would display above the column headings, which would compromise the appearance of the graph. Instead, the string Pain Score is specified with a FOOTNOTE. The KEYLEGEND statement specifies a one-column legend on the right. ods listing style=analysis; footnote bold 'Pain Score'; proc sgpanel data=freq; panelby pain / layout=columnlattice onepanel noborder novarname colheaderpos=bottom; vbar trt / response=percent group=trt; rowaxis grid offsetmax=0.05; colaxis display=none; keylegend /position=right across=1; run;



Figure 17. Adjacent Group Bar Chart

14

SAS Global Forum 2009

Pharma, Life Sciences and Healthcare

LATTICED GROUP BAR CHART
Figure 18 shows a latticed group bar chart. This example uses a COLUMNLATTICE layout; however, a ROWLATTICE layout would work as well. Each group has its own column, and each column contains all of the category values. The bars change appearance for the two group values, cycling through the GRAPHDATA1 and GRAPHDATA2 style elements. • • • The latticed group bar chart is generated with PROC SGPANEL. The PANELBY statement uses TRT as the column variable and specifies the COLUMNLATTICE layout. The VBAR statement uses PERCENT as the response variable, PAIN as the category variable, and TRT as the group variable. Using TRT as both the PANELBY variable and the group variable is done to cycle the group colors. The ROWAXIS statement draws horizontal grid lines. ods listing style=analysis; proc sgpanel data=freq noautolegend; panelby trt / layout=columnlattice novarname; vbar pain / response=percent group=trt; rowaxis grid; run;



Figure 18. Latticed Group Bar Chart BUTTERFLY GROUP BAR CHART
A butterfly plot is a plot drawn across a centered axis. The butterfly plot is particularly useful when comparing two halves of a whole. Figure 19 shows an example of a butterfly grouped bar chart that is generated with PROC SGPLOT and the LISTING style. The input data set contains six variables, where: MCASES = -1 x (# of male diagnoses) FCASES = # of female diagnoses CAUSE = cancer diagnosis cause Lung Cancer Colorectal Cancer Breast Cancer etc......... mcases -114760 -55290 -2030

MDEATHS = -1 x ( # of male deaths) FDEATHS = # of female deaths DEATHS = [abs(mdeaths) + fdeaths] mdeaths -89510 -26000 -450 fdeaths 70880 26180 40460 deaths 160390 52180 40910

fcases 98620 57050 178480

A trick is involved in the construction of the butterfly plot: The values to the left of the centered axis are actually negative numbers (and thus are negative bars), while the values to the right are positive numbers. The negative range of the axis displays with positive tick values by using a user-defined picture format. The user-defined picture format is named POSITIVE. POSITIVE displays numbers greater than 0 in a comma-separated format, numbers less than 0 in a comma-separated format without a negative sign, and the number 0 as itself. (Because 0 is not included in the range of values in the picture format, it is not formatted.) In figure 19, the left (negative) side displays horizontal bars for males, and the right (positive) side displays horizontal bars for females. The larger, more transparent bars show the number of new diagnoses, while the smaller, more opaque bars show the number of deaths.

15

SAS Global Forum 2009

Pharma, Life Sciences and Healthcare

In PROC SGPLOT: • • The user-defined format POSITIVE is assigned to all four response variables MCASES, MDEATHS, FCASES, and FDEATHS. The first HBAR statement displays MCASES (the response) by CAUSE (the category). MCASES is negative, so the bars display to the left of the centered axis. The bar uses the fill color from GRAPHDATA1 with TRANSPARENCY=.65, which lightens the saturation. The LEGENDLABEL text and a NAME= are assigned. These settings will be used later to construct the butterfly legend. The second HBAR statement displays MDEATHS by CAUSE. MDEATHS is also negative, so it displays to the left of the centered axis. The bars use GRAPHDATA1 for the fill color, but with more saturation (TRANSPARENCY=.25). The bar width is set to .5, half of the bar width in the first HBAR, and appears on top of the first HBAR. Again, the LEGENDLABEL text and a NAME= are assigned for later use. The third and fourth HBAR statements repeat the process for FCASES and FDEATHS by CAUSE. FCASES and FDEATHS are positive, so they display to the right of the centered axis. These two bars use GRAPHDATA2 for fill color. The KEYLEGEND statement explicitly states the order of the chicklets in the legend. The default order is to follow the order of the plot statements. In the KEYLEGEND statement, each chicklet is added explicitly by NAME=, with the chicklet text from LEGENDLABEL=. The XAXIS statement sets a blank axis label and vertical grid lines. The YAXIS statement sets a blank axis label and stipulates that the category values be drawn as they appear in the data set. The input data set is sorted in descending order by deaths, so the butterfly plot is also showing that lung cancer is the most deadly cancer, with colorectal cancer the second most deadly. Note that breast cancer causes more female deaths, but colorectal cancer causes more total deaths. proc format; picture positive low-<0='000,000' 0<-high='000,000'; run; proc sort data=cancer; by descending deaths; run; proc sgplot data=cancer; format mcases mdeaths fcases fdeaths positive.; hbar cause / response=mcases fillattrs=graphdata1 transparency=.65 legendlabel="New Cases (Male)" name="mcases" ; hbar cause / response=mdeaths barwidth=.5 fillattrs=graphdata1 transparency=.25 legendlabel="Deaths (Male)" name="mdeaths" ; hbar cause / response=fcases fillattrs=graphdata2 transparency=.65 legendlabel="New Cases (Female)" name="fcases"; hbar cause / response=fdeaths barwidth=.5 fillattrs=graphdata2 transparency=.25 legendlabel="Deaths (Female)" name="fdeaths"; keylegend "mcases" "fcases" "mdeaths" "fdeaths" / across=2; xaxis label=" " grid; yaxis label=" " discreteorder=data; run;







• •

Figure 19. Butterfly Plot

16

SAS Global Forum 2009

Pharma, Life Sciences and Healthcare

AXES
An axis always has an axis type. The underlying GTL determines the axis type from the plot statements that are used. Axes can be interval (numeric data where the distance between ticks is meaningful), or non-interval (discrete data where the distance between ticks is not meaningful). The XAXIS and YAXIS statements in PROC SGPLOT and the ROWAXIS and COLAXIS statements in PROC SGPANEL contain a TYPE= option that allows you to assign your own axis type, but you cannot assign an axis type incompatible with the axis variable. The axis types available are: LINEAR LOG TIME DISCRETE Use a standard interval axis if possible. Axis values must be numeric. Use a logarithmic axis if possible. Axis values must be numeric. Use a time axis if possible. All axis variables must be numeric SAS date, time, or datetime values. Use a non-interval axis if possible. Axis values can be character or numeric.

There are two situations in which you might want to override the automatic assignment of axis types. One is to create a log axis when the default axis is linear, and the other is to create a discrete axis when the default axis is linear. GTL uses a best fit algorithm to choose and format axis tick values. You can override part, or all, of the algorithm with the VALUES= and FITPOLICY= options. Figure 20 shows an example of a logarithmic scale on the Y axis. The input data set contains these data values: age Cpeptide 5.2 4.8 8.8 4.1 10.5 5.2 10.6 5.5 etc.........

• • •

The PBSPLINE statement creates a scatter plot and adds a penalized B-spline model fit line. The REFLINE statement draws a horizontal line at 4.4817 (e exponent.
1.5

= 4.4817). The line is labeled with the

The YAXIS statement specifies the LOG axis, LOGBASE=e, and LOGSTYLE=LOGEXPONENT. proc sgplot data=diabetes; pbspline x=age y=Cpeptide / clm="99% CLM" cli="99% CLI" markerattrs=(symbol=squarefilled); refline 4.4817 / label='1.5' labelpos=min; yaxis type=log logbase=e logstyle=logexponent label='log (base e) C-peptide'; run;

Figure 20. Logarithmic Scale on the Y Axis

GRAPH TEMPLATE LANGUAGE
GTL is the foundation upon which the SG procedures are built. While the SG procedures are powerful, they do not surface all of the options in GTL. You can, however, use the SGPLOT and SGSCATTER procedures to generate GTL code, which you can then customize as needed. To generate GTL, use the TMPLOUT=FILENAME option on

17

SAS Global Forum 2009

Pharma, Life Sciences and Healthcare

the procedure statement. FILENAME will contain the GTL template. Update the template with your changes, and add a PROC SGRENDER to render the graph. As an example, consider the following simple PROC SGPLOT: proc sgplot data=sashelp.class; scatter x=weight y=height; refline 100 / axis=x labelloc=inside label='Weight=100 lb' ; run; The SGPLOT procedure does not have an option to change the attributes of the REFLINE label. Next, generate the GTL template and add the text attributes: proc sgplot data=sashelp.class tmplout="tmpl.sas"; .... run; Add the attributes in the REFERENCELINE statement in the tmpl.sas file. For clarity, change the name of the template from SGPLOT (the procedure name is the default) to MYSGPLOT: proc template; define statgraph mysgplot; begingraph; layout overlay; ScatterPlot X=Weight Y=Height / primary=true LegendLabel="Height" name="scatter"; ReferenceLine x=100 / clip=true CurveLabel="Weight=100 lb" CurveLabelLocation=Inside curvelabelattrs=(color=red style=italic size=12pt); endlayout; endgraph; end; run; Submit PROC TEMPLATE, and then submit PROC SGRENDER, as shown in Figure 21. proc template; define statgraph mysgplot; ... rest of template from above run; proc sgrender data=sashelp.class template=mysgplot; run;

Figure 21. Customized GTL Code
See the SAS/GRAPH 9.2: Graph Template Language User's Guide for more information.

INTEGRATION WITH ODS
The SAS/GRAPH SG procedures (and GTL) are fully integrated with ODS. You can use ODS statements to customize your graph’s appearance, and you can extract ODS objects directly to use as input to the SG procedures. The following techniques are explained. ODS destination STYLE=style-definition IMAGE_DPI/DPI=dpi-setting SGE=on|off; DESTINATION can be LISTING, HTML, PDF, RTF, and so on. STYLE-DEFINITION can be any of the ODS styles. As noted earlier, the graphs in this paper were generated with the LISTING, ANALYSIS, or STATISTICAL style. These three styles, plus the JOURNAL (gray scale) and JOURNAL2 (black and white) styles, were designed for the effective presentation of graphics.

18

SAS Global Forum 2009

Pharma, Life Sciences and Healthcare

Figure 22 was generated with the same SG procedure code as in figure 1, but with the JOURNAL style instead of the LISTING style. ods listing style =journal; proc sgplot data=response; series x=visit y=response / group=trt markers; refline 1 / axis=x; keylegend / position=topright across=1ocation=inside; xaxis grid; yaxis grid; run;

Figure 22. Dose Response Plot with JOURNAL Style
DPI-SETTING stands for dots per inch and indicates the requested resolution of the graph. Each ODS destination has its own default DPI setting. SGE=ON|OFF—SGE=ON requests that a second output file be generated (an *.sge file) along with the image. This option is available only with the LISTING destination. The .sge file is used by the SAS/GRAPH ODS Graphics Editor, which is an interactive graphical application used to edit and annotate ODS graphics files. See the SAS/GRAPH 9.2: ODS Graphics Editor User's Guide for more information. ODS GRAPHICS / HEIGHT=dimension WIDTH=dimension IMAGEFMT=image-file-type | STATIC IMAGENAME='filename'; DIMENSION is the height and width of any graph. The SG procedures determine a best use image size, but use the HEIGHT= and WIDTH= dimensions when available. IMAGE-FILE-TYPE is the image format (PNG, GIF, and so on). STATIC is the best quality static image format for the requested ODS destination. FILENAME is the base name. If this is not specified, the name of the SG procedure is used. The filename is incremented automatically. See the SAS 9.2 Output Delivery System User's Guide for more information. ODS OUTPUT object = filename; You can ask ODS to produce a SAS data set from an ODS output object. Figure 23 shows an example from the SAS/STAT User’s Guide. The NLMIXED procedure generates an ODS OBJECT named PARAMETERESTIMATES. PARAMETERESTIMATES is written to a data set named EST. EST is used to generate a second data set named PRED, and PRED is used to generate a PROC SGPLOT. See the SAS/STAT 9.2 User's Guide for more information.

19

SAS Global Forum 2009

Pharma, Life Sciences and Healthcare

ods output ParameterEstimates=est; proc nlmixed data=headache; … code to generate the pred data set proc sgplot data=pred noautolegend; label minutes1='Minutes to Headache Relief' pcdf1 ='Estimated Patientspecific CDF'; series x=time y=pred1 / group=patient lineattrs= (pattern=solid color=black); series x=time y=pred2 / group=patient lineattrs=(pattern=dash color=black); scatter x=minutes1 y=pcdf1 / markerattrs= (symbol=CircleFilled size=9); scatter x=minutes2 y=pcdf2 / markerattrs=(symbol=Circle size=9); run;

Figure 23. PROC NLMIXED and PROC SGPLOT

USING SAS STATEMENTS
The SG procedures support TITLE, FOOTNOTE, BY (GROUP), FORMAT, and LABEL statements. PROC SGPANEL can contain both a BY variable and a PANELBY variable. The BY variable takes precedence, and the PANELBY variable generates one or more panels within each BY (GROUP) value. The SG procedures do not support the SAS/GRAPH statements GOPTIONS, LEGEND, AXIS, PATTERN, and SYMBOL. GTL (and the SG procedures) derive their appearance options from the active ODS style, with overrides specified with the MARKERATTRS=, LINEATTRS=, and FILLATTRS= options.

SG PROCEDURE STATEMENTS
Many plot statements are common to both the SGPLOT and SGPANEL procedures. These statements are: Basic Plots BAND NEEDLE SCATTER SERIES STEP Categorical Plots DOT HBAR HBOX HLINE VBOX VBAR VECTOR VLINE Fit Plots LOESS PBSPLINE REG Distribution Plots DENSITY HISTOGRAM Other KEYLEGEND REFLINE

Other statements are specific to only one SG procedure: SGPLOT ELLIPSE INSET XAXIS X2AXIS YAXIS Y2AXIS SGPANEL PANELBY COLAXIS ROWAXIS SGSCATTER COMPARE MATRIX PLOT

20

SAS Global Forum 2009

Pharma, Life Sciences and Healthcare

CONCLUSION
The SGPLOT, SGPANEL, and SGSCATTER procedures provide new tools to display and summarize results from clinical trials. The ability to overlay plots gives you the flexibility to create graphs specific to your needs. ODS styles enable you to simply and effectively use colors. The paneling features provide a concise way to view data by multiple levels of classification. And, best of all, the procedure syntax is straightforward and easy to use.

REFERENCES
Wang, Duolao, and Ameet Bakhai. 2006. Clinical Trials: A Practical Guide to Design, Analysis, and Reporting. London: Remedica Publishing. Dmitrienko, Alex, et al. 2005. Analysis of Clinical Trials Using SAS: A Practical Guide. Cary, NC: SAS Institute Inc. Shostak, Jack. 2005. SAS Programming in the Pharmaceutical Industry. Cary, NC: SAS Institute Inc. Matthews, Carol, and Shilling, Brian. 2008. Validating Clinical Trial Data Reporting with SAS. Cary, NC: SAS Institute Inc. The data for the butterfly plot are available from the American Cancer Society Web site: www.cancer.org.

ACKNOWLEDGMENTS
The author would like to thank Melisa Turner, Scott Singer, Dan Heath, and Sanjay Matange for their invaluable input.

RECOMMENDED READING
SAS/GRAPH 9.2: Statistical Graphics Procedures Guide Heath, Dan. 2007. “New SAS/GRAPH Procedures for Creating Statistical Graphics in Data Analysis.” Proceedings of the SAS Global Forum 2007 Conference. Cary, NC: SAS Institute Inc. Available at http://www2.sas.com/proceedings/forum2007 . Heath, Dan. 2008. “Effective Graphics Made Simple Using SAS/GRAPH ‘SG’ Procedures.” Proceedings of the SAS Global Forum 2008 Conference. Available at http://www2.sas.com/proceedings/forum2008 . Matange, Sanjay. 2008. “ODS Graphics Editor.” Proceedings of the SAS Global Forum 2008 Conference. Available at http://www2.sas.com/proceedings/forum2008 . Matange, Sanjay. 2008. “Introduction to Graph Template Language.” Proceedings of the SAS Global Forum 2008 Conference. Available at http://www2.sas.com/proceedings/forum2008 . Schwartz, Susan. 2008. “Butterflies, Heat Maps, and More: Explore the New Power of SAS/GRAPH.” Proceedings of the SAS Global Forum 2008 Conference. Available at http://www2.sas.com/proceedings/forum2008 . Heath, Dan. 2009. “Secrets of the SG Procedures.” Proceedings of the SAS Global Forum 2009 Conference.

CONTACT INFORMATION
Your comments and questions are valued and encouraged. Contact the author at: Susan Schwartz SAS Institute SAS Campus Drive Cary, NC 27513 susan.schwartz@sas.com SAS and all other SAS Institute Inc. product or service names are registered trademarks or trademarks of SAS Institute Inc. in the USA and other countries. ® indicates USA registration. Other brand and product names are trademarks of their respective companies.

21

Similar Documents

Free Essay

Procedure in Sas

...SAS Global Forum 2008 Reporting and Information Visualization Paper 264-2008 PROC TABULATE® and the Neat Things You Can Do With It Wendi L. Wright, CTB / McGraw-Hill, Harrisburg, PA ABSTRACT This paper starts with an introduction to PROC TABULATE®. It looks at the basic syntax, and then builds on this syntax by using examples on how to produce one-, two-, and three-dimensional tables using the TABLE statement. Some of the examples cover how to choose statistics for the table, labeling variables and statistics, how to add totals and subtotals, working with percents and missing data, and how to clean up the table. The presentation then shows several examples using the ODS STYLE= option in PROC TABULATE to customize tables and improve their attractiveness. This option is versatile and, depending on where the option is used, has the ability to justify cells or row and column headings, change colors for both the foreground and background of the table, modify borders, add a flyover text box in ODS HTML, or add GIF figures to the row or column headings. INTRODUCTION PROC TABULATE is a procedure that displays descriptive statistics in tabular format. It computes many statistics that other procedures compute, such as MEANS, FREQ, and REPORT and displays these statistics in a table format. TABULATE will produce tables in up to three dimensions and allows, within each dimension, multiple variables to be reported one after another hierarchically. There are also some very nice mechanisms...

Words: 3610 - Pages: 15

Free Essay

Jan Carlzon

...Harvard Business School 8-489-046 Rev. May 31, 2001 Jan Carlzon In June 1974, at the age of 32, I sat down behind the desk in the president’s office of Vingresor, a subsidiary of the Scandinavian Airlines System that assembles and sells vacation package tours. I’d been selected president after only six years of working life. I had authority over 1,400 employees, many of them roughly the same age as I. My qualifications were no better than anyone else’s, and there was no obvious reason for making me president. I was afraid—afraid that I wouldn’t be accepted and afraid that I would fail. I had taken over at Vingresor during troubled times. The 1973-1974 oil crisis had escalated air travel prices so much that passengers shied away from charter trips. It was our job to make Vingresor profitable again. We didn’t have many options. The main functions of a tour operator like Vingresor are to contract for flights and hotels and set up a service section at the travel resort that organizes excursions and activities. Then all these pieces are packaged together for the customer to purchase. The operator’s profit is to a great extent a question of cost: the more money invested throughout the various stages of assembling the package, the smaller the profit margin and the greater the chances of losing money. The less invested, the less the risk. In a sagging market, most product-oriented executives would have cut back on service. But this would only bring in less revenue, creating an...

Words: 15635 - Pages: 63

Free Essay

The Little Sas Book

...第一章 SAS 软件入门 1.1 SAS 语言 许多软件要么是菜单驱动,要么是命令驱动(输入命令——看结果) 。SAS 两者都不是,在 SAS 中,你用一个叫做 SAS 程序的一系列指令语句,这些程序可以表达出你想做的事情,并 用 SAS 语言写下来。SAS 有菜单驱动栏,比如 SAS 企业向导模块,它使 SAS 看起来像一个点 击的软件, 但这些模块仍然使用 SAS 语言为你写程序。 如果你试图用 SAS 写下你自己的程序, 那就要具备一定的灵活性。 SAS 程序 一个 SAS 程序就是一个按顺序执行的语句序列,一个语句给 SAS 下达信息和指 令, 且必须要正确的安放。 一个常用来与 SAS 程序做类比的例子是去银行取款, 你进入银行、 排队、轮到你,那么你会对柜台谁你想做的事,叙述语句可能会是这样: I would like to make a withdrawal. My account number is 0937. I would like$200. Give me five 20s and two 50s. 注意第一句话说了你想做的事情, 之后把相关信息传递给柜台并帮你完成要求。 这里信息传 递的顺序不重要,重要的是在你的叙述中,首先要说明你要做什么。你不能先说: “Give me five 20s and two 50s.”这会使柜台小姐一头雾水。此外,你必须确保后面的语句都围绕第一 句展开。 SAS 语句 像任何语言一样,SAS 语句的编写也需要遵守一些语法规则。幸运的是,相比英 语来说,SAS 语句的规则不仅少,而且简单。 最重要的规则是: 每一个 SAS 语句都由一个分号结尾 听起来很简单, 但即使最富有经验的 SAS 程序员也会偶然忘记分号。 如果你能记住这个规则, 再来看看另外两个规则吧。 SAS 程序布局 让每一条语句看起来整洁、用缩进来表现语句的各个部分,这是很有用的, 但不是必须的:  SAS 语句不区分大小写。  一条语句可以持续到第二行(只要不把一个单词分开) 。  几条语句可以用一行。 1  可以在任何一列中开始一条语句 注释 可以在你的程序中插入一些注释,让它更容易明白。即使你插入一些你喜欢的食物品 名也不会对程序有所影响, 因为 SAS 不读取注释。 但不要忘记注释是为了让某人更轻松的学 习你的程序,并明白你为什么这么做。 *Read animals’weights from file; DATA animals; INFILE’c:\MyRawData\Zoo.dat’; INPUT Lions Tigers; PROC PRINT DATA=animals; /*Print the results*/ RUN; 有两种注释方法,一种是*号和;号;一种是用/* */表示,注意第二种注释方法不能放在第 一列 错误 SAS 程序通常将执行的错误标注为醒目的红色字母,你可能忘了分号,拼错了字母, 按错了键盘, 一个小错误会使得整个程序无法运行。 当你看到红色部分多余黑色部分的时候, 不要灰心。 1.2 SAS 数据集 在你进行分析、撰写报告、对你的数据进行任何处理之前,SAS 必须能够处理你的数据,你 的数据必须是一种叫 SAS 数据集的特殊形式。 因为 SAS 非常灵活, 能够读取任何形式的数据, ...

Words: 6620 - Pages: 27

Free Essay

Swatch Case

...SWATCH WATCH U.S.A.: CREATIVE MARKETING STRATEGY ABSTRACT Switzerland was an industry leader in the watch market up until the 1970's when the digital watch was introduces to consumers.   The digital watch was inexpensive to manufacture and could be produced in mass. It created a whole new market by making watches inexpensive enough for all classes of people. The Swiss did not respond to this new competition and began to lose their market share. The Swiss watchmakers still produced high end watches for the wealthy, but did not compete for the lower end market. In the 1980's the Swiss watchmakers began to realize they needed to change their business model to fit in to the new global market place. They needed to not only change their views of the market but the infrastructure of watch manufacturing. In order to compete on a global level they needed to improve their technology, design products that would appeal to new markets and be able to compete with other companies both in quality and cost. The development of Swatch® allowed one company, the Swiss Corporation for Microelectronics and Watchmaking Industries (SMN), to do just that. SMN developed a product that was appealing to a younger target market. Their new design, distribution and production strategies created a niche market that became popular worldwide.   The company developed an advertising campaign that was new to the watch industry and was strongly directed at a younger audience. SMN was extremely successful...

Words: 773 - Pages: 4

Premium Essay

Sas Company Ltd

...Case about SAS institute ins. 1. One critic calls SAS "a big brother approach to managing people." Is the company too paternalistic? Can a company be too paternalistic? I do believe that SAS's approach to managing people is the result of an accurate analysis performed by the management staff. Therefore, when the management discusses improving employee retention rates, the initial topic is often higher salaries and bonuses. That is partly valid, because money is a key element; as SAS can attest, retention efforts can be very effective if they focus on more ways to spend the money than just increasing salary levels. With its strategy to boost employee retention, the company has created a culture and programs that encourage and drive employee loyalty. According to Pfeffer (2001), "Your profits come from loyal customers who do business with you for reasons other than just price. Customer loyalty is a consequence of loyalty from employees who produce great products and offer great service. In the short run, with enough venture money and enough product demand, any business model may appear feasible. In the long run, those companies that actually run their businesses efficiently and produce sustainable results will be the ones you keep reading about." ( 18). I do not think that this is a "big brother approach" at all; at the end, it is just a way to achieve a better business result. The top management prefers to spend money on the employees rather than spending money on recruiters...

Words: 915 - Pages: 4

Free Essay

Omega Company Review

...HISTORY The forerunner of Omega was founded at La Chaux-de-Fonds, Switzerland in 1848 by 23-year-old Louis Brandt, who assembled key-wound precision pocket watches from parts supplied by local craftsmen. He sold his watches from Italy to Scandinavia by way of England, his chief market. After Louis Brandt's death in 1879, his two sons Louis-Paul and César, troubled by irregular deliveries of questionable quality, abandoned the unsatisfactory assembly workshop system in favour of in-house manufacturing and total production control. Relocation Due to the greater supply of manpower, communications and energy in Biel/Bienne, the enterprise moved into a small factory in January 1880, then bought the entire building in December. Two years later the company moved into a converted spinning-factory in the Gurzelen area of Biel/Bienne, where its headquarters are still situated today. Their first series-produced calibres, Labrador and Gurzelen, as well as the famous Omega calibre of 1894, would ensure the brand's marketing success. Merger Louis-Paul and César Brandt both died in 1903, leaving one of Switzerland's largest watch companies — with 240,000 watches produced annually and employing 800 people — in the hands of four young people, the oldest of whom, Paul-Emile Brandt, was not yet 24. Brandt was the great architect and builder of Omega.[5] His influence would be felt over the next half-century. The economic difficulties brought on by the First World War would lead him to work...

Words: 3956 - Pages: 16

Premium Essay

Luxury Brand

...Swatch Group      1                                                                                                                                   Professor: Rolf Butz 10/28/2008 International Business BADM 455 Section 2   Swatch Group      2    Table of Contents                             Executive Summary .............................................................................................................. 1  Introduction ......................................................................................................................... 5  History ................................................................................................................................. 5  Industry Analysis .................................................................................................................. 7  Company & SWOT Analysis ................................................................................................ 11  Current Situation &Global Market ..................................................................................... 17  Competitor Analysis ........................................................................................................... 23  Recommendation............................................................................................................... 26  Conclusion ......................................................................................................................... 29  Methodology ...

Words: 8274 - Pages: 34

Premium Essay

Swatch Corporate Diagnosis

...Corporate Diagnosis | | | Diana Lucia PERDOMO Mauricio BARAHONA Salvador MARTINEZ Louise NICOLAS Katarzyna FLUDRA | The Swiss watches’ company is present all over the world. It has successfully managed environment changes, as well as it resources and competences. This document seeks to analyze the external and internal forces that have influence on the company, in order to determine strengths, weaknesses, threats and opportunities. Nevertheless, the core of this work it to diagnose the interaction between the above, and the Marketing and Communication strategies that Swatch implements nowadays The Swiss watches’ company is present all over the world. It has successfully managed environment changes, as well as it resources and competences. This document seeks to analyze the external and internal forces that have influence on the company, in order to determine strengths, weaknesses, threats and opportunities. Nevertheless, the core of this work it to diagnose the interaction between the above, and the Marketing and Communication strategies that Swatch implements nowadays CONTENT Corporate Presentation 3 External Analysis 9 PESTEL 10 Political 10 Economical 10 Social 10 Technological 10 Ecological 10 Legal 10 Porter's 5 Competitive Forces 12 Mc Kinsey matrix 14 Internal Analysis 16 Value chain 17 Infrastructure 17 Human resource management 17 Technology development 18 Procurement 19 Operations 20 Outbound...

Words: 6048 - Pages: 25

Premium Essay

Swatch

...Market Analysis : SWATCH GROUP Basic Analysis of the Watch Segment Gyanashree Maharana PGDM – BM Section - B Roll No – 82 Date of Submission : 7/14/2012 SWATCH GROUP TABLE OF CONTENTS SWATCH GROUP: AN INTRODUCTION KEY PRODUCTS AND SERVICES BRANDS: WATCH SEGMENT SWATCH: WORLD MARKET SWATCH GROUP IN FIGURES PRODUCTION STRATEGY SEGMENTATION TARGETING POSITIONING PROMOTION SWOT ANALYSIS 3 3 3 4 4 5 6 10 10 10 10 Page | 2 SWATCH GROUP SWATCH GROUP: AN INTRODUCTION The Swatch Group (or just ‘SWATCH’) is a manufacturer and distributor of watches, movements, components and other products. The group also manufactures mechanical and quartz movements, and is active in the design, production and marketing of electronic components. Swatch has subsidiaries and distributors worldwide. It is headquartered in Biel, Switzerland and employs about 28,000 people. KEY PRODUCTS AND SERVICES The key products and services that constitute the group are as follows – 1. 2. 3. 4. WATCHES RETAILING PRODUCTION ELECTRONIC SYSTEMS Our basic concern in this report will be on the Watch Segment. BRANDS: WATCH SEGMENT The following are the various brands that comprise the Watch Segment of the Swatch Group1: Prestige and Luxury Range Breguet Blancpain Glashutte Original Jacquet Droz Tiffany and Co. Leon Hatot Omega High-Price Range Longines Rado Union Glashutte Middle-Price Range Tissot Balmain Certina Hamilton ck Watch and Jewellery Basic Range Swatch Flik Flak 1 Info as in the Annual Report...

Words: 2251 - Pages: 10

Premium Essay

The Swatch Group

...CLIENT PROFILE The Swatch Group is an international group active in the manufacture and sale of finished watches, jewelry, watch movements and components. Swatch supplies nearly all components required by its nineteen watch brands, and Swatch companies supply movements and components to third-party watchmakers in Switzerland and around the world. Swatch Group is also a key player in the manufacture and sale of electronic systems used in watchmaking and other industries. Swatch employs more than 24 000 people in over 50 countries. THE CHALLENGE Swatch engaged the services of Real Facilities to evaluate its Greater Toronto Area real estate holdings, distribution network and repair facility in an attempt to manage its growing real estate costs. With two years remaining prior to expiry, the key challenge was to secure a long-term position in the market while simultaneously providing an exit strategy to accommodate changing business needs. REAL FACILITIES' RESPONSE Real Facilities took a very strategic approach to this requirement. A thorough analysis of Swatch's existing lease was completed together with indepth explorations of its operations and ongoing business strategy. Multiple scenarios were developed, including a potential relocation of operations to a new facility. Only at the appropriate time did Real Facilities engage in discussions with Swatch's existing landlord where the opportunity was presented to continue a long-term real estate relationship with...

Words: 261 - Pages: 2

Premium Essay

Swatch Analysis

...1) Why was the Swatch so successful? In what way was this watch different from others in the industry? The first main reason why Swatch managed to gained so much popularity in the watch industry is because they managed to cut costs. Heyek had started a low-end product initiative and was fully committed to vertical integration, that is, he intended to build and assemble the low-price quartz watches entirely in Switzerland. This, along with the decision to encase the watch with cheap plastic, helped the company lower costs substantially while maintaining a high quality profile (as it was made in Switzerland). Heyek had an important role in the success of Swatch. He decided that the Swatch would have a unique message, one unlike that of any other watch brand in the market. The fact that the company was not only selling a watch, but an important part of people’s self image, in my opinion, is the main reason why Swatch succeeded. The Swatch was different from the other watches in many ways but the factor that distinguished it the most from the rest is the fact that it could add genuine emotion to the product. It basically changed the consumer’s perspective of the product. Previously, watches were considered to be timekeeping instruments which had no personal meaning. Swatch started to design and sell watches that allowed customers to show their individuality, “they featured witty, sometimes outlandish designs that used brash, intense colors”. 2) Do you agree with the original...

Words: 893 - Pages: 4

Free Essay

Swatch Digital Impact Issues

...Swatch digital impact issues Swatch is a brand name for a line of wristwatches from the Swatch Group, a Swiss conglomerate with vertical control of the production of Swiss watches and related products. In 1984, Swatch was conceived and it was introduced to the market in Switzerland in March 1985. Swatch uses several software like Microsoft office, Adobe Creative Suite and other more technical software for the watches design and production. Swatch has its own website: http://www.swatchgroup.com where a lot of information is available: • The investors • The job seekers • The customers • The media and press. This website is very integral because it brings together many actors of the company. The website is also offering the “Swatch Group Info Service” which allows everyone to get information easily and efficiently about all the services of the company. Swatch is also present on Facebook, Swatch Watches has more than 650000 fans around the world and has a special page for every country, for example Swatch Türkiye has 220000 fans. Swatch is also on Twitter. Swatch has also a smartphone application: Swatch uses the main social networks for its communication, the creativity is a pillar for Swatch and its communication has also to be creative, the digitals tools of today offers to Swatch a lot of way to develop his image through the world. Swath communication: In its communication Swatch put the environmental question at the first plan: ...

Words: 832 - Pages: 4

Free Essay

Business Management

...INTERNATIONAL BUSINESS Title: SAS Scandinavian airline Teacher: Neil Coade Student: KhucThiNhung ID: 0201ndnd1109 Deadline: 21/10/2013 Table of Contents 1. INTRODUCTION ............................................................................................................. 3 2. LEADERSHIP .................................................................................................................. 4 3. ENVIROMENT ................................................................................................................. 5 4. STRATEGIC BUSINESS DEVELOPMENT IN THE FUTURE ......................... 6 4.1 A bright future with new airbus fleet. ......................................................................... 6 4.2 A long line fleet efficiency and modern ..................................................................... 6 4.3 Regarding fleet renewal plan long ............................................................................... 7 5. ORGANIZATION............................................................................................................. 7 6. MARKET ENTRY STRATEGY ................................................................................... 8 6.1 Strategic alliances .............................................................................................................. 8 6.1.1 Environment that can help the alliance strategy success .................................... 9 6.1.2 Environment having problems.........

Words: 2552 - Pages: 11

Premium Essay

Transformational Leadership

...Name: Instructor: Course Name: Date: Transformational Leadership Transformational leadership is the sort of leadership that inspires changes and transforms individual who follow a transformational leader (Gilbert). The concept of transformational leadership date back to 1978 when James McGregor Burns introduced it in his book, Leadership, where he defined it as a process where leaders and their followers heave one another to higher levels of morality and motivation. Such an approach to leadership has integrity, clear goals, high prospect, encourages others, offer support and acknowledgment, stirs the emotions of people, get people to look past their self-interest and instigates people to achieve for the improbable. John Kotter in his article, what leaders do, states "leadership and management are two distinctive and complementary systems of action. Each having its function and characteristic activities. Both traits are necessary for success in an increasingly complex and volatile business environment." It shows that for corporations, companies and firms to succeed must transformational leadership and management to be implemented hand in hand. Thus, understanding the difference between management and leadership may help companies groom their people to be able to provide both while at the same time shun away the myth that one cannot "manage and lead" (Hawkins). Transformational Leadership and Management Transformational leadership involves the following factors that would...

Words: 576 - Pages: 3

Premium Essay

Omega

...Brand and Business Overview of Omega Watch Makers There are many ways to attract consumers to purchase products, for example, price, advertising, word of mouth, branding, etc. However, before attracting customers to consume, the important things that companies have to achieve are finding the right purchasers, aiming at the correct market and using precise strategies and methods to analyze and promote their products. The market nowadays is not homogenous but diversified. Competition is also not just within a country but global due to rapid and easy transfer of information. In order to compete with various competitors and match what customers demand, companies should pay more attention to their strategies for marketing. From marketing text books, we can find plenty of strategies and methods to help companies to distinguish their target market, for example macro and micro environment analysis, SWOT analysis, marketing mix and STP strategy, etc. Enterprises will benefit from using these theories and increase market share or profit. In the following research, the marketing strategies and features will be outlined and identified with regards to the brand OMEGA in the Swatch Group, which is one of the best-known brands in the watch industry. Brand Overview OMEGA is one of the brands of the Swatch Group which is a well-known manufacturer in the watch market. There are 19 watch brands in the group, and each brand has different price categories in order to fit with different segments...

Words: 2675 - Pages: 11