How To Create Safety Tables In Sas

What are safety tables in SAS?

Safety and Efficacy tables (not effecasy wake up!) Safety tables provide the information as to how does the study drug affects OR what are the effects with regards to the overall health and safety of the patients. Safety measures can be Adverse events types, duration, serious or not, is it treatment emergent or not,, recovered from ae, survival/death, deaths withing 30days, etc.

Safety tables include group of TLFs produced on patients that are categorized as “Safety population”. Protocol or statistical canalysis plan details the criteria of who is considered as safety population. For example, “any subject who has gone through at least one drug exposure”, The tables, listings, figures such as AE’s, Sae’s, TEAE’s, Deaths, LabShifts to name a few.

Efficacy tables provide information as to how effective is the study drug, how much it alleviates the underlying symptoms of disease of interesthow beneficial are the benefits versus risks. The efficacy measures can be the overall remission rate, complete recovery, partial recovery, disease progress rate, how good are the effects compared to competetors one or placebo.

What is p value in clinical SAS?

P-value is a probability value commonly used in comparative clinical trials to test whether there exists a significant difference for a specific summary measure (e.g., mean, proportion, re- sponse, or survival time) among different treatment groups.

How do I insert a table in SAS?

Use the INSERT statement to insert data values into tables. The INSERT statement first adds a new row to an existing table, and then inserts the values that you specify into the row. You specify values by using a SET clause or VALUES clause. You can also insert the rows resulting from a query.

What is p-value in SPC?

A Look at Statistical Process Control through the P-Values Yoav Benjamini and Yechezkel Kling Tel Aviv University, Israel Abstract Statistical process control (SPC) involves repeated testing at each time point, or at each batch, of the same null hypothesis: that the process is under control.

  • The results of these tests are usually reported at a fixed level, by observing whether the test statistic is in the rejection region — outside the control lines.
  • In this work we address the use in SPC of the p-values, or their monotone transformation to the observed average run length value,
  • We argue that the use of p-value s in SPC carries with it major benefits: (a) It offers better graphical displays of the performance of the process, which are also easier to interpret; (b) it allows incorporating more complex control procedures into existing charts; and (c) it facilitates the incorporation of the effect of multiple testing into SPC.

We demonstrate the above by offering modifications to the P-charts, -S charts, and CUSUM, the latter requiring special approximations to the p -value. Adjusted p -values for multiplicity control in SPC are used for examining ten control charts for five quality attributes running in parallel. Key words : adjusted p -values, CUSUM, average run length, control charts, multiple comparisons.

    Introduction The use of control charts for Statistical Process Control (SPC) can be viewed as a repeated hypothesis testing where the tested null hypothesis is that the process examined is under control at the time the sample was drawn (e.g. Sarkadi and Vincze (1974, p.231), Alt (1985)). Woodall and Montgomery (1999) mention the relationship between hypothesis testing and control charts when listing major disputes in the research in SPC, Even when not specifically mentioned, it is a common practice to refer to the related type I and type II errors taking the aforementioned hypothesis for granted (e.g. Grant and Leavenworth 1980, p.109, and Bissell 1994, p.103). Assuming that the process is under control, and that the test statistics are statistically independent, the number of time points until the first false alarm is geometrically distributed. Therefore, the type I error, which is probability of a false alarm at a certain time point, is the reciprocal of the Average Run Length until false alarm ( ARL 0 ) (for instance see Bissell 1994, p.104). In many fields of research it is customary to report the results of statistical testing in terms of the p -value, rather than in the fixed level form where the pre-specified significance level is used and the results are reported in terms of “reject” (out-of-control) or “do not reject” (in-control), The p -value is the smallest significance level at which the relevant hypotheses would be rejected given the observed realized value of the test statistic (see discussion in Gibbons 1985). As such, the p -value carries the information of how strong is the evidence against the null hypothesis, being a measure of the extremity of the sample result in view of the null hypothesis. Almost all statistical packages and applications supplying statistical test procedures report the results in terms of the p -values. Thus later analysis can be performed at any desired significance level a, by comparing the resulting p -value to a, While discussions about the advantages, limitations, and misinterpretations of the p -values are abundant (e.g. Schervish, 1996, Cassela and Berger, 1987, Berger and Sellke, 1987), it remains the most common way of using and reporting the results of statistical testing. Placing the Action Line at the height of the observation and calculating the corresponding observed ARL 0 derives the analog of the observed p-value for SPC. That is, for observation of magnitude M, calculate the ARL 0 as if the future observations would be controlled using the action line fixed at height M, Then the p-value is the reciprocal of the observed ARL 0, In this work we argue that the use of p -values in SPC carries with it major benefits. First, it offers better graphical displays of the performance of the process, which are also easier to interpret. Second, it allows incorporating more complex control procedures into existing charts. Finally it facilitates the incorporation of the effect of multiple testing into SPC. We shall explain each of these points below. (a) Better graphical display In situations where sample size varies, most SPC charts have changing Action Lines. These plots tend to look messy and are confusing. For the sake of demonstration we have generated a P-chart with the above mentioned properties. The upper panel of Figure 1, displaying this P-chart, is cluttered and the eye is drawn to the motion of the action lines rather than to the actual measured proportion of defects. Moreover, points of the same magnitude may incorporate different risks; for instance the pair of runs 9 and 10 and the pair of runs 4 and 6. Notice that Run 4 is out of control while Run 6 is not, that is of the same magnitude but is based on more observations, is within the control lines. Thus the user of the chart has to compare relative lengths (between the measurement and the corresponding action line) that are scattered about. This perceptual task seems to be more difficult than all graphical elementary perceptual tasks that were discussed by Cleveland and McGill (1984). The lower panel of Figure 1 presents how the incorporation of the p -value s simplifies the above P-chart. It emphasizes the out of control signal, drawing the eye to the relevant information without diverting the attention from the original measurements. Note that the calculation of the p -value takes into account the sample size, simplifying the decision rule as to whether the process is out of control (the p -value is always compared to the same value). Though the construction of this plot, and its fine details, are yet to be explained (in section 2), the interpretation of the figure is quite intuitive. Charts using the p -value in the above way offer simple presentations avoiding unnecessary chart-junk (Tufte 1983) and enabling the design of visually effective displays. (b) Incorporating more complex control procedures One of the drawbacks of advanced control charts for SPC is that charts use statistics that have no natural interpretation within the contexts of the process examined and the measure plotted has no intuitive reading. For instance the Cumulative Sum (CUSUM) chart or a multivariate control chart using the Hotelling T 2 statistic. This is a painful problem since it inhibits their use in the manufacturing environment. There have been several attempts to amend this shortcoming for example Fuchs and Benjamini (1994) who point out that it is desirable to plot the observations in their original measurement scale. Superimposing the p -values that correspond to the above mentioned complicated statistics on a simple plot of the original measurements produces a simple intuitive chart. As a result, the chart’s appearance and interpretation do not change when the underlying statistical calculation is modified (e.g. using the t -distribution instead of the Gaussian distribution, or using the Exponentially Weighted Moving Average (EWMA) scheme instead of the CUSUM ). Figure 1: A P-chart with changing sample sizes. Upper panel displays the standard control chart. The lower panel displays the same data, incorporating the p-values information. The grayed area increases as the p-value decreases. A black dot represents an out-of-control observation (in the rejection region).

    C) Multiple testing Our own interest in utilizing p -values in SPC arose from our interest in multiplicity problems in SPC. Many aspects of commonly used SPC schemes are situations of multiple hypothesis testing. For instance, looking at different warning signals in the same chart, or looking at multiple quality characteristics of the same process in parallel charts.

    If unattended, the effect of multiplicity is to increase the type I error, thereby shortening the overall ARL 0 and inflating the number of false alarms. Many of the newly developed procedures that deal with the multiplicity situation need as their input only the information incorporated in the p -values (see reviews in Hsu, 1996, Westfall et al, 1999).

    • Thus obtaining the p -values for the SPC enables the use of advanced research results on the multiplicity problem within SPC.
    • Moreover, one way of reporting the results of these multiplicity controlling procedures is via adjusted p-values (Westfall and Young, 1992 and Westfall et al.1999), which can be interpreted and plotted as p -values.

    Therefore, the very same modifications to the SPC charts, which enable the portraying of p -value information, offer solutions by displaying the adjusted p -values. The concept of p -value is not new, so before any further discussion we should answer the most natural question a reader may pose: if the approach is so helpful, why is it not seen around more often in SPC? It will become clear that the proposed charts are prohibitively complex for charting by hand.

    1. The time now is ripe for the change, as most SPC charts are constructed these days by computerized systems.
    2. It is thus feasible, and more appropriate, to emphasize readability and ease of interpretation over ease of preparation.
    3. The next three sections will be devoted to substantiate, demonstrate and expand each one of the above points.

    In particular, in the next section, a situation of controlling a dry etch process is used to demonstrate several possible ways for presenting graphically the information about p -values on commonly used SPC charts, and a preferable way emerges. We then devote Section 3 to demonstrate how the use of p-values in SPC charts enables the incorporation of more complex procedures, by redesigning an – chart to show the information from a CUSUM procedure. A Markov chain based approximation is used to compute the p -value for the CUSUM procedure, and it is detailed in the Appendix. In Section 4 we demonstrate a simultaneous consideration of both the – part and the S part, the results of which are displayed in a new variant of the combined – S chart. Then we discuss an example of another common situation where ten control charts are plotted simultaneously, a pair on each of five different quality characteristics, during the calibration of a Fourier Transform Infrared (FTIR) spectrometer used for measuring carbon contamination in silicon wafers. Incorporating the p -values within SPC chart s

In order to demonstrate possible ways to incorporate the p-value within SPC charts, we will use the data presented by Lynch and Markle (1997) for a Dry Etch process. Six wafers were drawn at each run, and nine measurements were taken at fixed locations on the wafers. – chart similar to the chart used by Lynch and Markle (some of the points on the original plot do not correspond to the data set provided by the authors). The control lines on the figure were set for an ARL 0 of 500 which is equivalent to a type I error rate of 0.002. Figure 2: Shewhart control chart for the average Etch Rate for 27 runs as presented by Lynch and Markle. Control lines set at an ARL 0 of 500. Since the process clearly changed at Run 18 we will use the first 17 runs for the estimation of the process mean and the within run variance (runs 4 and 9 are excluded from the analysis due to their extreme variability – see Figure 9)., and the two-sided p -value is: (2) p obs = 2 (1- F (| z obs |)) Remark: It might be argued that a t distribution should be used for the p -value computations in (2) since the variance is estimated from 15 observations only. One of the merits of using p -values is that nothing is changed in the interpretation for the user of the charts that follow.

Thus the lay-operator of the process need not be instructed each time the underlying statistical calculations (carried out by the computer) are modified. Fuchs and Benjamini (1994) list three important principles for good SPC plots in step with Tufte (1983): ink should be proportional to the size of the warning signal; the original measurement scale should be maintained; and their interpretation should be relatively intuitive.

If we are to comply with the requirement that the amount of ink on paper will be proportional to the strength of the signal we cannot directly use the p -value. Moreover, it is desirable to use a measure that is related to the commonly used ARL, As we mentioned above, the ARL 0 is the reciprocal of the significance level of the statistical test.

ARL obs =

The ARL -value reflects the magnitude of the expected average run length until the next false alarm, if the alarm were to be sounded at the level currently observed. To ease the readability of the charts displaying the ARL -value, the retinal variables we shall display are proportional to the logarithm of the ARL -value. – chart. The bars are color-coded. Light gray corresponds to a small ARL -value (large p -value) and as the ARL -value grows (the p -value decreases) the gray gets darker. The original lines (Figure 2) are plotted as dashed lines and the full line presents the control line for the ARL -value.

  1. Thus instead of comparing the data points to the control lines one can (and should) refer to the distance of the ARL -value from their control line (set at -log 10 (0.002), ARL -value = 500, for this example).
  2. Were the process in control, the figure would have been relatively clear.
  3. However Figure 3 is dominated by dark gray and black and it could be seen in a glance that most of the time the process hovers far from the center (from the mean) — it is mostly ‘in the gray area’.

In this type of chart the attention is drawn to the ARL -value when it is relatively high and to the data points when the process is under control. This advantage is also a disadvantage when the chart is out of control since the information about the original variables is less visible because of the dark background. Figure 3: A combination of the original control chart for the average Etch Rate (right pain) and a Bar chart of the Log ARL-value which gives the magnitude of the expected ARL 0 (left pain). As the p-value gets smaller (the ARL-value bigger) the bars get darker. Thus the Out of Control (OOC) signal is completely black. The original action lines for the – chart are plotted as dashed lines and the full line presents the control line for the Log of the ARL-Value). Following the guidelines set by Cleveland and McGill (1984) and Fuchs and Benjamini (1994), Figure 4 presents an attempt to draw the eye equally to the value of the measurement and the p-value. Again the original – chart is used the basis for the plotting. The equal-sized dots are replaced with bars that are filled proportionally to the ARL -value. Thus an empty bar corresponds to a high p -value and a full bar to a small p -value. A Black filling marks an out of control signal.

Since the ARL -value goes to infinity as the p -value nears zero, we have set, arbitrarily, the frame of the bar at 3.5 standard deviations (-log 10 (0.0009); ARL -value = 1111). In this figure it is still clear that most of the measurements are relatively far from the center. However the differences among the p -values ( Observed ARLs ) are less distinct than in Figure 3 since color-coding was not used and the bars are much shorter.

On the other hand, Cleveland and McGill (1984) point out that this type of display is superior not only because is utilizes perception skills that are high in the elementary task scale but also because the empty spaces in the bars help the comparison.

The measurement value is plotted as a circle. This symbol is preferable since the eye is drawn naturally to its center. Note that it is difficult to decide which of the points 22 or 27 is lower in Figure 6 than in Figures 7. The comparison of areas per se is inferior to the comparison of the boxes that involves comparison of locations on different scales. Nevertheless, in plotting the outer circle we manage to keep much of the advantage of the second. This kind of chart involves the same perceptual tasks that are used when the symbol is a box (such as in Figure 6). For instance lengths are compared along the radius as part of the comparison of the areas. Though the symbol is relatively small the differences among the p -values are quite distinguishable since areas are compared together with the comparison of length (along the radius). The attention is equally drawn to the measured value and the corresponding p -value.

Therefore this type of chart will be used in the rest of the discussion. Remark 2.1. When color displays are available, the chart could be given a 3-dimensional look following Carr and Sun (1999). Using shades of gray lined with white and gray lines “light” the surfaces from the upper left corner of the figure thus creating the visual effect of raised rejection regions and observation points.

Carr and Sun (1999) point out that coloring the dots red makes them appear closer thanks to the focal length of this color. Therefore, the filled area, which is proportional to the ARL -value, is painted bright red when the signal is out-of-control, and otherwise the red is mixed with a little blue (purple).

Hence they remain legible for color-blind people (and also when printed on black and white printers). For a color version of Figure 5, see, Remark 2.2 The charts presented above, as well as all other charts in this paper, were created using the SAS/Graph annotation facility.

    Combining the CUSUM and – chart via the p -values For Figures 3 to 5 the p -values were calculated to correspond with the simple test of location underlying the – chart. However, as we previously pointed out, the p -values (and the corresponding ARL-values ) may be used to simplify the interpretation of a SPC chart based on a less-than-intuitive statistic. The ARL -value in Figures 6 and 7 are for a positive shift CUSUM and a negative shift CUSUM respectively, where the p -values for the CUSUM were obtained using a Markov chain representation of the process (see Appendix A). -chart and the CUSUM, In these two figures, the p- values on the chart add significant new information, yet enable the display of the original measurements on the original scale. Figure 4: The control chart for the average Etch Rate as in Figure 3, but the uniform sized dots are replaced with bars. Each bar is partially filled with darker bar. The height of the darker bar is proportional to the log(ARL-Value), A black filling marks an out of control signal. Figure 5: The control chart for the average Etch Rate as in Figure 4, but bars are replaced with circles Each circle is partially filled with darker area. The area of the darker dot is proportional to the log(ARL-Value), A black filling marks an out of control signal. Figure 6: A combination of an – chart and a ‘positive shift CUSUM’, with K=0.5 standard deviation. The control chart for the average Etch Rate is the same as in Figure 4, but the area of the filling of the circles is proportional to the log( ARL-value) for the positive CUSUM. A black filling marks an out of control signal according to the CUSUM (p-value<0.003, ARL-value > 333.33 ). There are several runs that were found to be out of control by the CUSUM but not by the – chart (runs 15, 19, 22, 25, and 27 on Figure 7). Also note runs 10 through 14 on Figure 9 that are very close to the mean and yet have relatively small p -values (large ARL -values). On the other hand Runs 3 and 9 on Figure 6 and Run 18 on Figure 7 have measurements that are outside the action lines of the – chart even though they do not give out of control signals according to the CUSUM. The two separate positive shift and negative shift CUSUM charts can also be combined to a single two-sided CUSUM chart. The graphical solution is presented in Figure 8.

    The circle is divided into two where the upper half is dedicated to the positive shift CUSUM and the lower half to the negative shift CUSUM, The horizontal line, halving the circle, helps the reading of the chart, by separating clearly the information in the two part of each circle. Multiplicity adjustment There are several situations of SPC that require attention to the multiplicity problem.

    The simplest is controlling several aspects of a process, for example simultaneously inspecting the -chart and the S-chart for the same quality attribute. The most common one is using multiple criteria on the same chart, such as various action line rules combined with some run’s length rules (see Grant and Leavenworth 1980, p.282-284 for an approximate calculation of the type I error rate for this situation). The combination of a CUSUM and a -chart, suggested in the previous section, is another example of such a situation. Controlling multiple attributes of a product (e.g. screw length, screw diameter, etc.), is also becoming a more common problem, and controlling the quality of the final product which is manufactured in several steps is yet a different multiplicity problem.

    These situations are rarely separated. In a typical example we have encountered at a paper mill, five quality characteristics and four additional control variables are simultaneously displayed on a large plot, the workers being instructed to monitor simultaneously four traditional warning signals on each.

    The probability of a false alarm increases when several tests of the same hypothesis are conducted jointly, or when several hypotheses are simultaneously tested. This was already noted by Hilliard and Lasater (1966), who estimated through simulation the overall type-I error-rate when three criteria are applied simultaneously to an -chart, and found it to be almost 0.27, although for each single criterion the type I error rate was set at 0.05. Remedies for the increased error-rate exist, but usually have not been used by practitioners. Actually, such remedies were not even recommended. Figure 7: A combination of an – chart and a ‘Negative shift CUSUM’ (k=0.5 standard deviation). The control chart for the average Etch Rate is the same as in Figure 4, but the area of the filling of the circles is proportional to the log( ARL-value) for the negative CUSUM. A black filling marks an out of control signal according to the CUSUM (p-value<0.003, ARL-value > 333.33 ). Figure 8: A combination of an – chart, a ‘positive shift CUSUM’, and a ‘Negative shift CUSUM’ (both with K=0.5 standard deviation). The control chart for the average Etch Rate is the same as in Figure 4. The area of the filling of the upper half of the circles is proportional to the log(ARL-value) for the positive shift CUSUM. The area of the filling of the lower half of the circles is proportional to the log(ARL-value) for the negative shift CUSUM.

    A black filling marks an out of control signal according to the CUSUM (p-value 333.33). As research of SPC expands into less traditional uses in fields that are not purely industrial, concern about multiplicity should rise. Svolba (1999) uses SPC to monitor clinical trials. Addressing explicitly the issue of multiplicity is not only a standard practice in the analysis of clinical trials, but regulating authorities such as the FDA also requires it.

    The approach for dealing with each of the multiplicity problems discussed above is not straightforward, and sometimes debatable. Should we always control the probability of making even one error? Only when the process is under control? May the control of the false discovery rate be enough? We shall touch in passing on these issues which warrant a more thorough discussion, as our emphasis is on the p -value concept and charts.

    The p -value is instrumental to many multiplicity correction techniques such as Bonferroni, Holm’s, Hochberg’s, and others (see Hochberg and Tamhane 1987, Westfall and Young 1992, Hsu 1996 and Benjamini and Hochberg 1995 and 1997). Furthermore it is beneficial to use the multiplicity-adjusted p-value in the SPC charts thereby avoiding the necessity of specifying the significance level prior to the calculations when a multiplicity correction procedure is implemented.

    As a simple example, suppose that the Bonferroni procedure is used to control for multiplicity, so each p -value p i is compared to the significance level a divided by the number of hypotheses ( a /n). Instead, the adjusted p-value in this case is p i *= np i, which should be now compared to a, -chart and an S-chart (see Figures 2, 9, and 11), a task for which already Alt (1985) had noted the need for. Lynch and Markle present the -chart and the S-chart for the Dry Etch data discussed above in the usual way, with no correction for the fact that the combined ARL 0 is shorter. For the first example we take the approach that controls the traditional probability of making even one error, and therefore assures that the combined ARL 0 is at the pre-set level. and the other from the analysis of S, and combines them to report two new multiplicity-adjusted p -values. Computationally, if p(1) p(2) are the two sorted individual p -values, the adjusted p -values are p (2) * =p (2), and p (1) * =min(2p (1), p (2) *). These two can now be displayed and compared, each to the same desired level. Figure 9: S-chart for the standard deviation of the Etch Rate for 27 runs, as presented by Lynch and Markle. In Figure 10 the -chart and the S -chart are displayed separately in the traditional way. The filled areas of the circles are proportional to -log 10 ( adjusted p -value ), which henceforth will be called the adjusted ARL -value obtained for the – and the S -chart. In Figure 11 one chart incorporates both statistics in a similar way, displaying the adjusted ARL -value s in the lower and upper halves. (The action lines on these figures are not multiplicity adjusted, although they can be incorporated as well). Figure 10: Control charts for the average (left) and the standard deviation (Right) of the Etch Rate for 27 runs presented by Lynch and Markle. The area of the filling in the left figure is proportional to the log(adjusted ARL-value) for the – chart and the area of the filling in the right figure is proportional to the log(adjusted ARL-value) for the S-chart. The multiplicity adjustment is done according to Hochberg’s procedure. A black filling marks an out of control signal Figure 11: A combined -S control chart for the Etch Rate in Figure 10. Each circle is divided into two: The area of the filling of the upper half is proportional to the log(adjusted ARL-value) for the – chart and the area of the filling of the lower half is proportional to the log(adjusted ARL-value) for the S control chart. The multiplicity adjustment is done according to Hochberg’s procedure. A black filling marks an out of control signal While presenting both measures and their corresponding p -values, this chart emphasizes visually the location information over the spread information.

    1. It is immediate to create the dual chart that emphasizes spread over location.
    2. Choosing the more appropriate one as default for a specific process, and being able to toggle to the other (or to the separate chart) upon need could give the best practical tool.
    3. Figures 10 and 11 suggest that the dispersion of the process is small for most of the time and usually is not affected by shifts in the mean of the process.

    Runs 4, 9, and 27 have relatively strong signals for both shift and spread but they are not statistically significant after correcting for multiplicity. Though Runs 18 and 4 are outside the control lines signaling a shift in the mean or variance correspondingly, their signal is not strong enough to be considered extreme once correcting for multiplicity.

    1. This example demonstrates how the effect of multiplicity, if unattended, is to increase the type I error, thereby shortening the overall ARL 0 and inflating the number of false alarms.
    2. As an example of a more complex situation we use Pankratz (1997) who describes an experiment to check a new FTIR measuring machine.

    Five specimens with known contents of carbon (standards) were measured repeatedly for ten days. For each specimen both the location and spread were analyzed using control charts. The purpose was to identify extreme measurements so that the clean data could be used to calculate a calibration curve.

    1. If each control chart were designed with an ARL 0 of 500 ( a =0.002) then the overall ARL 0 for all ten charts together, assuming all statistics are independent, is about 50 ( a =0.02).
    2. On the other hand, if for some of the attributes the process is not under control, the control of the overall type I error rate ( FWE) might be too conservative to identify the multiple sources for out-of-control data.

    We therefore use the approach of Benjamini and Hochberg (1995) who offer a procedure that controls the expected proportions of false alarms to the alarms (False Discovery Rate, or FDR ). If the process is under control, the procedure controls the ARL 0 at the desired level.

    • But if the process is out of control, the procedure is much more powerful.
    • The results of the procedure in Benjamini and Hochberg (1995) can also be described by introducing FDR -adjusted p -values (Yekutieli and Benjamini, 1999, and Troendle, 2000), and they, in turn, can be transformed to FDR -adjusted ARL -values as before.

    Figure 12 presents the control charts for the measurements presented in Pankratz. The area of the filled out circles is proportional to the appropriate FDR adjusted ARL-value, The FDR adjustment uses again the ten sorted p-values for the ten hypotheses tested at each day, p (1) p (2) p (10), and is given by (4) p* (i) = max,

    This procedure is also known to be less sensitive to the size of the problem, which means that the number of charts look at simultaneously does not severely affect the decision as to which attributes are out of control. The lines of the charts in Figure 12 are based on the estimation of the means and standard deviations.

    When basing the calculations on the specimens’ known contents of carbon as reported by Pankratz, it is apparent that the measurements

    Spe cimen charts S charts

    Figure 12: – charts and S control charts for FTIR measurements of five standard specimens presented in Pankratz (1997). The area of the filling of the circle is proportional to -log(adjusted p-value) where the adjustment is according to the FDR controlling procedure. for Specimens D and F, though quite constant, are way off. This could mean that the carbon contents of these specimens were not as supposed (possibly due to long shelf life). The outs of control signals (identified by the black dots) are noticed immediately, even though there is a lot of information on the page. In the original presentation one had to examine each chart looking for the points that lay outside the control lines to find these signals. Discussion

The versions of SPC charts that we presented incorporate information about p -values, in the form of observed ARL – values, The charts remain intuitive to the end users since the observations are also plotted in the original measurement scale no matter what statistics are used. – chart with variable parameters, and Costa (1999a) discusses a joint scheme of a – chart and an R- chart with variable sample sizes and sampling intervals. These are situations which call for the use of complicated charts: variable action lines, complicated statistic, and the multiplicity problem. Costa plots the standardized mean and standardized range in order to obtain stable warning and action lines.

  1. Changing the above-suggested charts so that p -values are displayed will enable the plotting of the observations in the original measurement scale.
  2. On this scale, regions where sampling should be conducted more frequently, and with larger sample size, can be easily identified.
  3. Thus the approach we suggest in this work can most naturally find its use such problems.

Woodall and Montgomery (1999) point that ” Given the difficulties associated with interpreting signals from multivariate control charts, more work is needed on graphical methods for data visualization.” The definition of the p-value and adjusted p-value for SPC, and its graphical implementation, enable the study of the multiplicity issues in SPC including those related to multivariate control charts.

These issues will become more important as SPC finds its ways into areas other than manufacturing. While we have demonstrated in this paper that multiplicity considerations make a difference, in terms of the different conclusions they may lead to, we have not addressed in this work the fundamental questions that should be associated with the introduction of multiplicity considerations into SPC.

Our ongoing research strives to identify where the problem occurs, where the potential harm is greatest, what the appropriate error measure for each situation is, and what available procedure, or newly designed ones, should be used to control it. Appendix – The calculation of the p-value for the CUSUM chart With no loss of generality, the discussion will be restricted to a simple one-sided CUSUM control chart, assuming that when the process is in control the observations are drawn from a standard Gaussian distribution. calculated. For the ‘ Positive Shift CUSUM’ the test statistic is where k is a constant set at the desired shift in mean to be detected (in terms of standard deviation). The distribution of S t is not easily obtained nor is the ARL 0, Brook and Evans (1972) approximate the ARL 0 using a Markov chain representation. In order to use their method the possible values for S t should be grouped into intervals – ‘ states ‘ in the terminology of Markov chain analysis. ), and let n k be the integer part of, The state above the action line is defined as absorbing (State N s ) and all negative values are grouped as ‘ Zero ‘ (State 1). Thus there are N s states the process can be in (see Figure 13). The transition probability from state i at time t to state j at time t+1 is approximated using a discretization of the Gaussian distribution: (1) Note that the transition probability matrix P ij is a function of the specified action line (AL) and the magnitude of the shift in mean to be detected (K). Brook and Evans (1972) show that the ARL 0 can be approximated by the first element of (I-R) -1 1 ; where R is obtained by omitting the last row and column from the transition probability matrix P, 1 is a vector of length N s —1 whose elements are all 1, and I (Ns —1* Ns —1) is the identity matrix. ). We can still define the p-value as the reciprocal of the observed ARL -value even in our dependent case. Now p 0 is the significance level of the single hypothesis test in the series of independent tests which is equivalent (in terms of ARL-value) to the observed result of the test performed by the SPC procedure. Figure 13: A schematic representation of the transition of the process between states References Alt, F.B. (1985), “Multivariate quality control,” in Encyclopedia of Statistical Sciences, eds. Kotz, S., and Johnson, N.L., 6, 110-122. Bissell, D. (1994), Statistical Methods for SPC and TQM, Chapman & Hall, London.

  • Benjamini, Y., Hochberg, Y.
  • 1995), “Controlling the false discovery rate: a practical and powerful approach to multiple testing,” Journal of the Royal Statistical Society B, 57, 289-300.
  • Benjamini, Y., Hochberg, Y.
  • 1997), “Multiple hypotheses testing with weights,” Sca – ndinavian Journal of Statistics, 24, 3, 407-418.

Berger, J.O., Sellke, T. (1987), “Testing a point null hypothesis: The irreconcilability of p -values and evidence”, Journal of the American Statistical Association 82,112-122. Brook, D., Evans, D.A. (1972), ” An Approach to the probability distribution of CUSUM run length,” Biometrika, 59, 3, 539-549.

  • Carr, D., Sun, R.
  • 1999), “Using Layering and Perceptual Grouping In Statistical Graphics,” Statistical Computing & Statistical Graphics Newsletter, Vol.10, No.1, pp.25-31.
  • Casella, G., Berger, R.L.
  • 1987), “Reconciling Bayesian and frequentist evidence in the one-sided testing problem,” Journal of the American Statistical Association 82,106-111.

Cleveland, W.S., McGill, R. (1984), “Graphical Perception: Theory, experimentation, and application to the development of graphical methods,” Journal of the American Statistical Association, 79, 387, 531-553. Costa, A.F.B. (1999a), “Joint and R Charts with Variable Sample Sizes and Sampling Intervals,” Journal of Quality Technology, 31, 4, 387-397. Costa, A.F.B. (1999b), ” Charts with Variable Parameters,” Journal of Quality Technology, 31, 4, 408-416. Fuchs, C., Benjamini, Y. (1994), “Multivariate profile charts for statistical process control,” Technometrics, 36, 182-195. Gibbons, J.D. (1985), “P-values,” in Encyclopedia of Statistical Sciences eds.

Otz, S., Johnson, N.L., 6, 366-368. Grant, E.L., Leavenworth, R.S. (1980), Statistical Quality Control, (5th edition) McGraw-Hill Book Co., New York, NY Hilliar, J.E., Lasater, H.A. (1966), “Type I Risks When Several Tests Are Used Together on Control Charts for Means and Ranges, No Standard Given,” Industrial Quality Control, 56-61.

Hochberg, Y., Tamhane, A. (1987), Multiple Comparison Procedures, Wiley & Sons, N.Y. Hochberg, Y. (1988), “A sharper Bonferroni procedure for multiple tests of significance,” Biometrica, 75, 800-803. Hsu, J.C. (1996), ” Multiple Comparisons: Theory and Methods,” Chapman and Hall., London.

  • Jackson, J.
  • E (1959), Quality control methods for several related variables,” Technometrics, 1, 359-377.
  • Lynch, R.O., Markle, R.
  • J (1997), “Understanding the nature of variability in a Dry Etch process”, in Statistical Case Studies for industrial process improvement, (eds), Czitrom, V., and Spagon, P.D.

ASA-SIAM series on statistical and applied probability, Ch.7, pp.71-86. Montgomery, D.C., Klatt, P.J. (1972), “Economic design of T 2 control charts to maintain current control of a process,” Management Science, 19, 77-89. Pankratz, P.C. (1997), “Calibration of an FTIR Spectrometer for Measuring Carbon,” in Statistical Case Studies for industrial process improvement, (eds), Czitrom, V., and Spagon, P.D., ASA-SIAM series on statistical and applied probability, Ch.3, 19-38.

Sarkadi, K., Vincze, I. (1974), Mathematical methods of statistical quality control, Academic press, New York. Schervish, M.J. (1996), “P values: what they are and what they are not,” The American Statistician, 50,3,203-206. Svolba, G. (1999), “Statistical quality control in clinical trials,” Dissertation, WUV-Universitatsverlag, Vienna, Austria.

Troendle, JF ( 2000) “Stepwise normal theory multiple test procedures controlling the false discovery rate,” Journal of Statistical Planning and Inference, 84 (1-2) 139-158. Tufte, E., R., (1983), The visual display of quantitative information, Graphics Press, Cheshire, Connecticut.

Westfall, P.H., and Young, S.S. (1992), Resampling-based multiple testing, John Wiley & Sons, Inc., New York, NY. Westfall, P.H., Tobias, R.D., Rom, D., Wolfinger, R.D., Hochberg, Y. (1999), Multiple Comparisons and Multiple tests using the SAS Systems, SAS Institute, Cary, North Carolina. Woodall, W., H., and Montgomery, D., C., (1999), “Research Issues and Ideas in Statistical Process Control,” Journal of Quality Technology, 31, 4, 376-386.

Yekutieli, D., and Benjamini (1999), “Resampling-based false discovery rate controlling multiple test procedures for correlated test statistics,” Journal of Statistical Planning and Inference, 82 (1-2) 171-196.

How do you interpret p-value data?

Frequently asked questions about p-values – How do you calculate a p-value? P -values are usually automatically calculated by the program you use to perform your statistical test. They can also be estimated using p -value tables for the relevant test statistic, P -values are calculated from the null distribution of the test statistic. They tell you how often a test statistic is expected to occur under the null hypothesis of the statistical test, based on where it falls in the null distribution. If the test statistic is far from the mean of the null distribution, then the p -value will be small, showing that the test statistic is not likely to have occurred under the null hypothesis. What is statistical significance? Statistical significance is a term used by researchers to state that it is unlikely their observations could have occurred under the null hypothesis of a statistical test, Significance is usually denoted by a p -value, or probability value. Statistical significance is arbitrary – it depends on the threshold, or alpha value, chosen by the researcher. The most common threshold is p < 0.05, which means that the data is likely to occur less than 5% of the time under the null hypothesis, When the p -value falls below the chosen alpha value, then we say the result of the test is statistically significant.

What is a significant p-value score?

Fallacies of P Value – Just as test of hypothesis is associated with some fallacies so also is P value with common root causes, ” It comes to be seen as natural that any finding worth its salt should have a P value less than 0.05 flashing like a divinely appointed stamp of approval” 12,

The inherent subjectivity of Fisher’s P value approach and the subsequent poor understanding of this approach by the medical community could be the reason why P value is associated with myriad of fallacies. Thirdly, P value produced by researchers as mere ‘’passports to publication” aggravated the situation 13,

We were earlier on awakened to the inadequacy of the P value in clinical trials by Feinstein 14, “The method of making statistical decisions about ‘significance’ creates one of the most devastating ironies in modern biologic science. To avoid usual categorical data, a critical investigator will usually go to enormous efforts in mensuration.

  1. He will get special machines and elaborate technologic devices to supplement his old categorical statement with new measurements of ‘continuous’ dimensional data.
  2. After all this work in getting ‘continuous’ data, however, and after calculating all the statistical tests of the data, the investigator then makes the final decision about his results on the basis of a completely arbitrary pair of dichotomous categories.

These categories, which are called ‘significant’ and ‘nonsignificant’, are usually demarcated by a P value of either 0.05 or 0.01, chosen according to the capricious dictates of the statistician, the editor, the reviewer or the granting agency. If the level demanded for ‘significant’ is 0.05 or lower and the P value that emerge is 0.06, the investigator may be ready to discard a well-designed, excellently conducted, thoughtfully analyzed, and scientifically important experiment because it failed to cross the Procrustean boundary demanded for statistical approbation.

  1. We should try to understand that Fisher wanted to have an index of measurement that will help him to decide the strength of evidence against null effect.
  2. But as it has been said earlier his idea was poorly understood and criticized and led to Neyman and Pearson to develop hypothesis testing in order to go round the problem.

But, this is the result of their attempt: “accept” or “reject” null hypothesis or alternatively “significant” or “non significant”. The inadequacy of P value in decision making pervades all epidemiological study design. This head-or-tail approach to test of hypothesis has pushed the stakeholders in the field (statistician, editor, reviewer or granting agency) into an ever increasing confusion and difficulty.

  1. The threshold value, P < 0.05 is arbitrary. As has been said earlier, it was the practice of Fisher to assign P the value of 0.05 as a measure of evidence against null effect. One can make the "significant test" more stringent by moving to 0.01 (1%) or less stringent moving the borderline to 0.10 (10%). Dichotomizing P values into "significant" and "non significant" one loses information the same way as demarcating laboratory finding into normal" and "abnormal", one may ask what is the difference between a fasting blood glucose of 25mmol/L and 15mmol/L?
  2. Statistically significant (P < 0.05) findings are assumed to result from real treatment effects ignoring the fact that 1 in 20 comparisons of effects in which null hypothesis is true will result in significant finding (P < 0.05). This problem is more serious when several tests of hypothesis involving several variables were carried without using the appropriate statistical test, e.g., ANOVA instead of repeated t-test.
  3. Statistical significance result does not translate into clinical importance. A large study can detect a small, clinically unimportant finding.
  4. Chance is rarely the most important issue. Remember that when conducting a research a questionnaire is usually administered to participants. This questionnaire in most instances collect large amount of information from several variables included in the questionnaire. The manner in which the questions where asked and manner they were answered are important sources of errors (systematic error) which are difficult to measure.

How do I insert a custom table?

For a basic table, click Insert > Table and move the cursor over the grid until you highlight the number of columns and rows you want. For a larger table, or to customize a table, select Insert > Table > Insert Table, Tips:

If you already have text separated by tabs, you can quickly convert it to a table. Select Insert > Table, and then select Convert Text to Table, To draw your own table, select Insert > Table > Draw Table,

Where are SAS tables stored?

SAS tables are stored in SAS libraries. A SAS library is a collection of one or more SAS files that are recognized by SAS. In a Microsoft Windows environment, for example, a SAS library is typically a group of SAS files in the same folder or directory.

Sashelp – a permanent library that contains sample data that you can use. This is a read-only library. You cannot save content to this library. Work – a temporary library for files that do not need to be saved. Files in this library are deleted when you close SAS.

All SAS tables have a two-level name. The first name is the libref, which tells SAS which library contains the table. The second name is the name of the table. The two names are separated by a period. For example, sashelp.class refers to the table named Class that is stored in the Sashelp library.

  1. If the table is stored in the temporary Work library, then you do not have to specify the two-level name.
  2. You can use only the name of the table, and SAS assumes that it is stored in the Work library.
  3. If you want to save data in a library so that you can use it again the next time you open SAS Studio, you must create your own library.

You can learn more about creating a library,

What is the difference between table and tables in SAS?

There is no difference. The statement is the TABLES statement, but SAS will silently accept TABLE as a synonym without issuing any warning or note. Some miss spellings will generate just a warning while others will cause an error.1668 proc freq data= sashelp.class; 1669 tablex age name; – 1 WARNING 1-322: Assuming the symbol TABLE was misspelled as tablex.1670 run; NOTE: There were 19 observations read from the data set SASHELP.CLASS.1671 1672 proc freq data= sashelp.class; 1673 tabl age name; – 1 WARNING 1-322: Assuming the symbol TABLE was misspelled as tabl.1674 run; NOTE: There were 19 observations read from the data set SASHELP.CLASS.1675 1676 proc freq data= sashelp.class; 1677 tab age name; – 180 ERROR 180-322: Statement is not valid or it is used out of proper order.1678 run; NOTE: The SAS System stopped processing this step because of errors. Tom Tom 47.2k 2 gold badges 16 silver badges 29 bronze badges

How much is 5 sigma?

Five-sigma corresponds to a p-value, or probability, of 3×10 7, or about one in 3.5 million. That is, there’s less than one chance in 3.5 million that the effect being seen is due to random chance.

What does 5% p-value mean?

Is a 0.05 P-value Significant? – A p-value less than 0.05 is typically considered to be statistically significant, in which case the null hypothesis should be rejected. A p-value greater than 0.05 means that deviation from the null hypothesis is not statistically significant, and the null hypothesis is not rejected.

What does a 0.4 p-value mean?

Understand how low p-value leads to rejection of null hypothesis. – Image from Unsplash When we start studying the concepts of probability and statistics, there are a few topics that require us to take a logical leap, often leaving us confused. In my earlier post, I have talked about one such topic, confidence interval.

  1. In this post, I will try to explain another such confusing topic, p-value.
  2. Spoiler alert: No, it is not probability, but is related to probability) Why we fail to understand the concept of p-value is because we neglect the basic interpretation of p-value and focus on just the probability aspect of it.

My aim here is just to explain the basic English interpretation of p-value, which is often neglected. Before diving in, two prerequisites are to be discussed: Conditional probability and Hypothesis testing. P(A|B) is interpreted as the probability of A given or conditioned on event B.

P(it will rain today) =0.4 means that there is a 40% chance that it will rain today. This is an unconditional probability. There is no condition or assumption associated with it. P(it will rain today | sky is grey) =0.7 means that the probability of it raining today has increased because we now have new information that the sky is grey.

This probability answers the question, given that the sky is grey, what is the likelihood of it raining today. In the first paragraph of Wikipedia, the concept is explained clearly. Now, if P(it will rain today | sky is grey) =0.3, it doesn’t mean that the chances of rain today is low, but the possibility that it will rain today GIVEN the sky is grey, is small.

Is P 0.05 significant or not?

“P In 2011, the U.S. Supreme Court unanimously ruled in Matrixx Initiatives Inc.v. Siracusano that investors could sue a drug company for failing to report adverse drug effects—even though they were not statistically significant. Describing the case in the April 2, 2011, issue of the Wall Street Journal, Carl Bialik wrote, “A group of mathematicians has been trying for years to have a core statistical concept debunked.

  • Now the Supreme Court might have done it for them.” That conclusion may have been overly optimistic, since misguided use of the P value continued unabated.
  • However, in 2014 concerns about misinterpretation and misuse of P values led the American Statistical Association (ASA) Board to convene a panel of statisticians and experts from a variety of disciplines to draft a policy statement on the use of P values and hypothesis testing.

After a year of discussion, ASA published a consensus statement in American Statistician (doi:10.1080/00031305.2016.1154108). The statement consists of six principles in nontechnical language on the proper interpretation of P values, hypothesis testing, science and policy decision-making, and the necessity for full reporting and transparency of research studies.

P > 0.05 is the probability that the null hypothesis is true. 1 minus the P value is the probability that the alternative hypothesis is true. A statistically significant test result (P ≤ 0.05) means that the test hypothesis is false or should be rejected. A P value greater than 0.05 means that no effect was observed.

If you answered “none of the above,” you may understand this slippery concept better than many researchers. The ASA panel defined the P value as “the probability under a specified statistical model that a statistical summary of the data (for example, the sample mean difference between two compared groups) would be equal to or more extreme than its observed value.” Why is the exact definition so important? Many authors use statistical software that presumably is based on the correct definition.

It’s very easy for researchers to get papers published and survive based on knowledge of what statistical packages are out there but not necessarily how to avoid the problems that statistical packages can create for you if you don’t understand their appropriate use,” said Barnett S. Kramer, M.D., M.P.H., JNCI ‘s former editor in chief and now director of the National Cancer Institute’s Division of Cancer Prevention.

(Kramer was not on the ASA panel.) Part of the problem lies in how people interpret P values. According to the ASA statement, “A conclusion does not immediately become ‘true’ on one side of the divide and ‘false’ on the other.” Valuable information may be lost because researchers may not pursue “insignificant” results.

  • Conversely, small effects with “significant” P values may be biologically or clinically unimportant.
  • At best, such practices may slow scientific progress and waste resources.
  • At worst, they may cause grievous harm when adverse effects go unreported.
  • The Supreme Court case involved the drug Zicam, which caused permanent hearing loss in some users.

Another drug, rofecoxib (Vioxx), was taken off the market because of adverse cardiovascular effects. The drug companies involved did not report those adverse effects because of lack of statistical significance in the original drug tests ( Rev. Soc. Econ.2016;74:83–97; doi:10.1080/00346764.2016.1150730).

ASA panelists encouraged using alternative methods “that emphasize estimation over testing, such as confidence, credibility, or prediction intervals; Bayesian methods; alternative measures of evidence, such as likelihood ratios or Bayes Factors; and other approaches such as decision-theoretic modeling and false discovery rates.” However, any method can be used invalidly.

“If success is defined based on passing some magic threshold, biases may continue to exert their influence regardless of whether the threshold is defined by a P value, Bayes factor, false-discovery rate, or anything else,” wrote panelist John Ioannidis, Ph.D., professor of medicine and of health research and policy at Stanford University School of Medicine in Stanford, Calif.

  • Some panelists argued that the P value per se is not the problem and that it has its proper uses.
  • A P value can sometimes be “more informative than an interval”—such as when “the predictor of interest is a multicategorical variable,” said Clarice Weinberg, Ph.D., who was not on the panel.
  • While it is true that P values are imperfect measures of the extent of evidence against the null hypothesis, confidence intervals have a host of problems of their own,” said Weinberg, deputy chief of the Biostatistics and Computational Biology Branch and principal investigator of the National Institute of Environmental Health Sciences in Research Triangle Park, N.C.

“If success is defined based on passing some magic threshold, biases may continue to exert their influence regardless of whether the threshold is defined by a P value, Bayes factor, false-discovery rate, or anything else.” Beyond simple misinterpretation of the P value and the associated loss of information, authors consciously or unconsciously but routinely engage in data dredging (aka fishing, P -hacking) and selective reporting.

  1. Any statistical technique can be misused and it can be manipulated especially after you see the data generated from the study,” Kramer said.
  2. You can fish through a sea of data and find one positive finding and then convince yourself that even before you started your study that would have been the key hypothesis and it has a lot of plausibility to the investigator.” In response to those practices and concerns about replicability in science, some journals have banned the P value and inferential statistics.

Others, such as JNCI, require confidence intervals and effect sizes, which “convey what a P value does not: the magnitude and relative importance of an effect,” wrote panel member Regina Nuzzo, Ph.D., professor of mathematics and computer sciences at Gallaudet University in Washington, D.C.

  1. Nature 2014;506:150–2).
  2. How can practice improve? Panel members emphasized the need for full reporting and transparency by authors as well as changes in statistics education.
  3. In his commentary, Don Berry, Ph.D., professor of biostatistics at the University of Texas M.D.
  4. Anderson Cancer Center in Houston, urged researchers to report every aspect of the study.

“The specifics of data collection and curation and even your intentions and motivation are critical for inference. What have you not told the statistician? Have you deleted some data points or experimental units, possibly because they seemed to be outliers?” he wrote. Kramer advised researchers to “consult a statistician when writing a grant application rather than after the study is finished; limit the number of hypotheses to be tested to a realistic number that doesn’t increase the false discovery rate; be conservative in interpreting the data; don’t consider P = 0.05 as a magic number; and whenever possible, provide confidence intervals.” He also suggested, “Webinars and symposia on this issue will be useful to clinical scientists and bench researchers because they’re often not trained in these principles.” As the ASA statement concludes, “No single index should substitute for scientific reasoning.” : “P

Is P 0.1 statistically significant?

This leads to the typical guidelines of: p weak evidence or a trend, and p ≥ 0.1 indicating insufficient evidence, and a strong debate on what this threshold should be.

Why do we use 0.05 level of significance?

The researcher determines the significance level before conducting the experiment. The significance level is the probability of rejecting the null hypothesis when it is true. For example, a significance level of 0.05 indicates a 5% risk of concluding that a difference exists when there is no actual difference.

What is safety database?

What is a Pharmacovigilance Safety Database? – A pharmacovigilance safety database is the central repository for individual case safety reports or ‘ICSRs collected for a company’s medicinal product(s) from all sources globally. It is vital that any pharmacovigilance safety database is kept up to date with the latest regulatory requirements and validated to meet both international standards and business requirements.

What are shift tables in SAS?

Shift tables display the change in the frequency of subjects across specified categories from baseline to post-baseline time points. They are commonly used in clinical data to display the shift in the values of laboratory parameters, ECG interpretations, or other ordinal variables of interest across visits.

What is the difference between table and tables in SAS?

There is no difference. The statement is the TABLES statement, but SAS will silently accept TABLE as a synonym without issuing any warning or note. Some miss spellings will generate just a warning while others will cause an error.1668 proc freq data= sashelp.class; 1669 tablex age name; – 1 WARNING 1-322: Assuming the symbol TABLE was misspelled as tablex.1670 run; NOTE: There were 19 observations read from the data set SASHELP.CLASS.1671 1672 proc freq data= sashelp.class; 1673 tabl age name; – 1 WARNING 1-322: Assuming the symbol TABLE was misspelled as tabl.1674 run; NOTE: There were 19 observations read from the data set SASHELP.CLASS.1675 1676 proc freq data= sashelp.class; 1677 tab age name; – 180 ERROR 180-322: Statement is not valid or it is used out of proper order.1678 run; NOTE: The SAS System stopped processing this step because of errors. Tom Tom 47.2k 2 gold badges 16 silver badges 29 bronze badges

What is the difference between tables and listings in SAS?

Getting Started with the SAS System Using SAS/ASSIST Software
A listing report displays data from a table. Using the Listing Report task, you can display all the data from a table, or a portion of the data, based on criteria that you specify. By following the instructions in this section, you can produce a report that shows the information for ranch-style homes from the HOUSES table. A table is a collection of information arranged in columns and rows. A column is a set of data values that represents a particular type of data; for example, the price of all the houses. A row is a set of data values for the same item; for example, all the information about one house, such as price, style, square footage, and so on.

  1. To create a listing report, you first set up the report by following this selection path:
    Tasks Report Writing Listing.

    The List a Table window appears. List a Table Window

  2. If the active table is SASUSER.HOUSES, continue to the next step. Otherwise, select Table, and then select the SASUSER.HOUSES table. For more information on selecting tables, see Selecting a Table,
  3. If there is an active Subset Data selection (indicated with BY, WHERE, or ROWS next to the Subset data button), clear the selection. For more information, see Clearing a Subset Data Selection,
  4. If other report selections exist (for example, Columns is not -ALL- ), follow this selection path to clear these selections:
    File New


  5. To produce a report that lists all the data in the HOUSES table, follow this selection path:
    Run Submit

    The Listing Report appears in the Output window. Listing of HOUSES Table The listing report is a quick way to get a list of all the data in your table. Note the different styles of the houses. For the sample report shown in Information on Ranch Style Houses Report, only the RANCH style houses are selected.

  6. If the report is wider or longer than the window, use the scroll bars or the FORWARD, BACKWARD, LEFT, and RIGHT function keys to look at the rest of the report. Refer to Using Function Keys for further information on function keys.
  7. After you have finished looking at the report, return to the List a Table window by using one of the following methods, depending on your operating environment:
    • Use the PREVWIND function key.
    • Click on the SAS/ASSIST window.

    Note: Under some operating environments, if you are using the Output window and the report is longer than one display, the last display of the report is shown after you select Close once. In this case, select File and then Close again. The task window reappears.

To produce the report shown in Information on Ranch Style Houses Report, you need to subset and customize the report. Subset the data as follows:

  1. Select Subset data in the List a Table window. The Subset Data window appears. Subset Data Window You subset the data if you want to produce a report that uses only some of the data in the table. For example, to produce the sample report shown in Information on Ranch Style Houses Report, you need to subset the data so that only data for ranch-style houses are used.
  2. Select WHERE clause, The Build a WHERE Clause to Subset the Current Data window appears. Build a WHERE Clause to Subset the Current Data Window This window enables you to create a WHERE clause that specifies criteria for selecting rows. The rows that match the criteria in the WHERE clause are used in the report. For this example, you build a WHERE clause that selects only the houses where STYLE=RANCH. You subset the data by using one of the following methods:
    • You can type the WHERE clause directly by selecting Edit the WHERE clause and typing STYLE=’RANCH’ under Edit the current WHERE clause,
    • You can build the WHERE clause by making selections from this window. The items that are available for selection are highlighted while you build the WHERE clause. For example, when the Build a WHERE Clause window appears, only the Column, Constant, Function, NOT, and Opening parenthesis items are highlighted because these are the only items that can begin a WHERE clause.
  3. To build the WHERE clause using the items in the window, select Column from the Build a WHERE Clause window, and then select the STYLE column. For more information, see Selecting a Column,
  4. Select Comparison operator from the Build a WHERE Clause window. A window with a list of valid comparison operators appears. Select Data Window (Comparison Operators)
  5. Select the equal operator from the Select Data window. The Build a WHERE Clause window reappears.
  6. There are two ways to specify a constant value. Use one of the following methods:
    • Select Look up constants, SAS/ASSIST software searches the column and presents a list of unique values in the Select Data window. Select Data Window (Look Up Constants) Select RANCH and then select OK, Note: Using Look up constants prevents you from making typing errors. However, it is more useful when there are a small number of possible values than when there are a large number of possible values.
    • Select Constant. from the Build a WHERE Clause window. The Enter a Character Constant window appears. Enter a Character Constant Window To select the ranch-style houses, type RANCH in the Value field. Make sure RANCH is in uppercase because all of the style values are in uppercase in this sample data. Any time you use a character string for a constant value in a WHERE or BY clause, you need to make sure you use the exact case of the character string in the table. If the word ranch had been in lowercase in the HOUSES table, you would type ranch,
  7. Select OK, The Build a WHERE Clause window reappears. The WHERE clause that you built is shown under the WHERE clause being built item as shown in the following display. Completed WHERE Clause To make changes to the WHERE clause, select Edit the WHERE clause, You can then make changes to the column, comparison operator, and constant. Note that in certain operating environments, there is an additional option to Verify where clause against data, If you select this option, SAS software checks to see if there are any rows that meet the conditions of your WHERE clause. If your table is very large, this verification can take a long time.
  8. Select OK and then Goback to return to the List a Table window. Notice that the value for the Subset data field is WHERE, This indicates that a WHERE clause is being used to subset your data.

You can customize the report by adding titles and footnotes, changing the page dimensions, and selecting headings. Follow these directions to add a title to your report:

  1. Follow this selection path:

    Edit Titles.

    The Titles window appears. Titles Window

  2. Select Title 1 from the Titles window. The Title 1 window appears. Title 1 Window
  3. In the Title 1 field, type the title exactly as you want it to appear on the report. For this report, type the title Information on Ranch Style Houses, Select OK twice to return to the List a Table window. Note: Because the same set of titles and footnotes is used for all SAS/ASSIST tasks, the titles and footnotes most recently used in your SAS/ASSIST session are used unless you change or reset them. If a title already exists when you open the Titles window, type the new title over the old title.

After you have finished setting up the report, you can run the report.

  1. Follow this selection path:
    Run Submit

    The report appears in the Output window. Information on Ranch Style Houses Report This report shows all the data for the ranch-style houses in the HOUSES table.

  2. If the report is wider or longer than the window, use the scroll bars or the FORWARD, BACKWARD, LEFT, and RIGHT function keys to look at the report.

If you do not want to print the report, go to the next section. To print the report, follow these instructions.

  1. Follow this selection path from the Output window:

    File Print

    Depending on your operating environment, the output may be sent directly to your default printer, or you may see the Print window, where you can select printing options. Print Window

  2. Make sure the name of your default printer (or some other printer of your choosing) appears in the Default Printer field in the Print window. If it does not, select Setup. and choose your printer from the list that appears. If you do not know which printer to choose, contact the SAS Support Consultant at your site.
  3. To print the current report, select Print in the Print window. The report is sent to your printer, and a message appears in the Output window indicating how many lines were printed.

Note: If you are generating HTML output, you can view the report in your HTML browser and print using the browser’s print function. See Setting Up HTML Output for details on HTML output with SAS/ASSIST software. When you have finished viewing or printing your report, return to the List a Table window by using one of the following methods, depending on your operating environment:

  • Use the PREVWIND function key.
  • Click on the SAS/ASSIST window.

To return to the WorkPlace menu or move on to another task, follow the directions in Exiting a Task, Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.