In addition, you can optionally specify one of each of the following statements:
FREQ
variable ;
WEIGHT
variable ;
ID
variable ;
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 of the WEIGHT variable to modify the computation of a number of summary statistics by assuming that the variance of the ith value of the analysis variable is equal to , where 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[9]:
If the value is zero, the observation is counted in the total number of observations.
If the value is negative, it is converted to zero, and the observation is counted in the total number of observations.
If the value is missing, the observation is excluded from the analysis.
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, , to compute weighted versions of the statistics[10] provided in the Moments table. For example, the procedure computes a weighted mean and a weighted variance as and where 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 and in place of 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 are used to compute weighted percentiles[11].
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.
[9] In SAS 6.12 and earlier releases, observations were used in the analysis if and only if the WEIGHT variable value was greater than zero.
[10] In SAS 6.12 and earlier releases, weighted skewness and kurtosis were not computed.
[11] In SAS 6.12 and earlier releases, the weights did not affect the computation of percentiles.