|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
assuming that the variance of the ith
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
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*:
If the value is zero, the observation is counted in the total number
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
To exclude observations that contain negative and zero weights
from the analysis, specify the option EXCLNPWGT in the
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
provided in the
For example, the procedure computes
a weighted mean
and a weighted variance
where xi is the ith variable value.
The divisor d is controlled by the VARDEF= option in the PROC CAPABILITY
When you use both the WEIGHT and SPEC statements,
capability indices are computed using
sw in place of
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
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.
Copyright © 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.