In addition, you can optionally specify one of each of the following statements:
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 is the value of the FREQ variable for a given observation, then that observation is used 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 th 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 follows1:
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 statistics2 provided in the Moments table. For example, the procedure computes a weighted mean and a weighted variance as and where is the th variable value. The divisor 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 . 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 percentiles3.
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.
Footnotes