Chapter Contents
Chapter Contents
Previous
Previous
Next
Next
PROC CAPABILITY and General Statements

BY, FREQ, WEIGHT, and ID Statements

In addition, you can optionally specify one of each of the following statements:

BY variables;

FREQ variable;

WEIGHT variable;

ID variable;

The BY statement specifies variables in the input data set that are used for BY processing. A separate analysis is done for each group of observations defined by the levels of the BY variables. The input data set must be sorted in order of the BY variables.

The FREQ statement names a variable that provides frequencies for each observation in the input data set. If n is the value of the FREQ variable for a given observation, then that observation is used n times. If the value of the FREQ variable is missing or is less than one, the observation is not used in the analysis. If the value is not an integer, only the integer portion is used.

The WEIGHT statement names a variable that provides weights for each observation in the input data set. The CAPABILITY procedure uses the values wi of the WEIGHT variable to modify the computation of a number of summary statistics by assuming that the variance of the ith value Xi of the analysis variable is equal to \sigma^2/w_{i}, where \sigma is an unknown parameter. This assumption is rarely applicable in process capability analysis, and the purpose of the WEIGHT statement is simply to make the CAPABILITY procedure consistent with other data summarization procedures, such as the UNIVARIATE procedure.

The values of the WEIGHT variable do not have to be integers and are typically positive. By default, observations with non-positive or missing values of the WEIGHT variable are handled as follows*:



To exclude observations that contain negative and zero weights from the analysis, specify the option EXCLNPWGT in the PROC statement. Note that most SAS/STAT procedures, such as PROC GLM, exclude negative and zero weights by default.

When you specify a WEIGHT variable, the procedure uses its values, wi, to compute weighted versions of the statistics* provided in the Moments table. For example, the procedure computes a weighted mean \overline{X}_{w} and a weighted variance sw2 as \(
 \overline{X}_{w} = \frac{ \sum_{i} w_{i}x_{i} }{ \sum_{i} w_{i} }
\)and \(
 s_{w}^2 = \frac{ 1 }{ d } \sum_{i} w_{i} ( x_{i} - \overline{X}_{w} )^2
\)where xi is the ith variable value. The divisor d is controlled by the VARDEF= option in the PROC CAPABILITY statement.

When you use both the WEIGHT and SPEC statements, capability indices are computed using \overline{X}_{w} and sw in place of \overline{X} and s. Again, note that weighted capability indices are seldom needed in practice.

When you specify a WEIGHT statement, the procedure also computes a weighted standard error and a weighted version of Student's t test. This test is the only test of location that is provided when weights are specified.

The WEIGHT statement does not affect the determination of the mode, extreme values, extreme observations, or the number of missing values of the analysis variables. However, the weights wi are used to compute weighted percentiles*.

The WEIGHT variable has no effect on the calculation of extreme values, and it has no effect on graphical displays produced with the plot statements.

Chapter Contents
Chapter Contents
Previous
Previous
Next
Next
Top
Top

Copyright © 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.