Variable Specification (SPCHART command)

If data are organized as illustrated in Table 1, the variable specification on P or NP subcommands is

VAR BY VAR

The variable that is specified before BY is the status variable (for example, OUTCOME in Table 1). The value of this variable determines whether an item is considered conforming or nonconforming. The status variable can be any type, but if it is a string, the value that is specified on CONFORM (or NONCONFORM) must be enclosed in quotes (see ). The variable that is specified after BY is the category variable and can be any type of variable. The chart is sorted by values of the category variable.

If data are organized as shown in Table 2, the variable specification on P or NP is

COUNT(VAR) N({VAR}) [BY VAR]
             {VAL}

The variable that is specified on keyword COUNT is the variable that contains the number of nonconforming or defective items (for example, RELAPSE in Table 2). The specification on keyword N is either the variable that contains the sample size or a positive integer for a constant size across samples (for example, N in Table 2). The COUNT variable cannot be larger than the N variable for any given subgroup; if it is larger, the subgroup is dropped from calculation and plotting. Keyword BY and the category variable are optional. When specified, the category variable is used for category axis labels; otherwise, the category axis is labeled 1 to the number of subgroups. Cases are unsorted for the control chart.