1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
Q.
I am running SPSS Tables.  I have a variable that has a category that
nobody responded to.  I would like to have that value displayed in my
Tables output.  How can I do this?

A.
The key here is to create a dummy case that would have the value in
question for the given variable and one valid value for any of the other
questions that will appear in the table.  Then we create a flag variable
that differentiates that case from the other cases.  Finally, we will
create the table as we normally would but would use the flag variable as
a layer variable.

Here is an example:

** Here is a dataset with two variables - VARA and
** VARB.  VARA has no cases with the value 3, and
** that is the value that we want to display in our
** table.

DATA LIST free / vara varb.
BEGIN DATA
1 1 1 1 1 2 1 2 1 3 1 3 1 4 1 4 1 5 1 5
2 1 2 1 2 2 2 2 2 3 2 3 2 4 2 4 2 5 2 5
4 1 4 1 4 2 4 2 4 3 4 3 4 4 4 4 4 5 4 5
5 1 5 1 5 2 5 2 5 3 5 3 5 4 5 4 5 5 5 5
END DATA.

** The data does not contain cases with VARA=3.
** In the Data Editor window we will add a
** case where VARA=3.  VARB can be any
** valid value (in this case, any value from
** 1 to 5).  Go to the Data Editor window, scroll to the last
** case, and MANUALLY ENTER the data for this new case.

** Then, we'll create the flag variable.

COMPUTE flag=0.
IF (vara=3) flag=1.
EXECUTE.

** Now, we can create the table.

TABLES
  /table=vara by varb by flag
  /statistics count (vara) cpct (vara:varb flag).

** Note that in the /STATISTICS subcommand,
** we specified the FLAG variable as a base
** percentage variable.  That way the percents
** on the "legitimate" table.


*One other thing you can do is to make the VARIABLE LABELS and VALUE
*LABELS in Flag a blank.  This effectively hides any layer reference.