Data Organization (SPCHART command)

Data for p and np charts can be organized where each case is a unit or where each case is a subgroup.

  • If each case is a unit with a conformity status variable and a subgroup identifier, cases are assigned to a category by the value of the subgroup identifier. Table 1 is an example of this type of data organization. The data do not have to be sorted. A BY variable (the subgroup identifier) is required to sort and aggregate data and label the category axis.
  • If each case is a subgroup, one variable contains the total number of items within a subgroup, and one variable contains the total number of nonconforming or defective items in the subgroup. The subgroup identifier is optional. If specified, the subgroup identifier is used for labeling purposes. Table 2 is an example of this type of data organization. The data are the same as the data that are used in Table 1.
Table 1. Each case is a unit for p and np charts
Subgroup Outcome
January Cured
January Cured
January Cured
January Relapse
February Relapse
February Cured
February Relapse
February Relapse
... ...
Table 2. Each case is a subgroup for p and np charts
Subgroup Relapse N
January 1 4
February 3 4
... ... ...