Is there a way to display response options that have 0 responses in SPSS frequency output? The default is for SPSS to omit in the frequency table output any response option that is not selected by at least a single respondent. I looked for a syntax-driven option to no avail. Thank you in advance for any assistance!
-
You can't request it in Frequencies procedure. You can in Custom Tables procedure if all the expected values have value labels. – ttnphns Feb 12 '15 at 18:48
-
If you don't have Custom Tables but you have old good `Tables` command (which is not represented as menu in modern SPSS versions) you can do it via it. Plus the alternatives given to you below in the answers. – ttnphns Feb 12 '15 at 20:04
-
And, _of course_, if your SPSS version is 17+, you can go to Codebook procedure (all expected values must have value labels, to be displayed). – ttnphns Feb 12 '15 at 20:21
-
It has been a long time since I used the old TABLES command, but IIRC it does not take value labels into account, so unrepresented values would not appear. If a bar chart would do, you could use the Chart Builder or GGRAPH and see the unrepresented values. And GGRAPH is in Base. – JKP Feb 13 '15 at 03:45
-
@JKP: Jon, about `TABLES`. If you create a variable having all the the expected values or those of them which have zero count, and input that variable along with the analyzed one(s) in "Frequency Tables" menu (now called comparametric tables) you'l' get the right result. – ttnphns Feb 13 '15 at 09:15
-
But then you have that irrelevant column in your table. You could hide that afterwards, but this seems like a pretty painful way to accomplish this task. – JKP Feb 14 '15 at 13:31
3 Answers
It doesn't show because there is no one single case in the data is with that attribute. So, by forcing a row of zero you'll need to realize we're asking SPSS to do something incorrect.
Having said that, you can introduce a fake case with the missing category. E.g. if you have Orange, Apple, and Pear, but no one answered they like Pear, the add one fake case that says Pear.
Now, make a new weight variable that consists of only 1. But for the Pear case, make it very very small like 0.00001. Then, go to Data > Weight Cases > Weight cases by and put that new weight variable over. Click OK to apply. Now what happens is that SPSS will treat the "1" with a weight of 1 and the fake case with a weight that is 1/10000 of a normal case. If you rerun the frequency you should see the one with zero count shows up.
If you have purchased the Custom Table module you can also do that directly as well, as far as I can tell from their technical document. That module costs 637 to 3630 depending on license type, so probably only worth a try if your institute has it.

- 1,289
- 8
- 13
So, I'm a noob with SPSS, I (shame on me) have a cracked version of SPSS 22 and if I understood your question correctly, this is my solution:
- double click the Frequency table in Output
- right click table, select Table Properties
- go to General and then uncheck the Hide empty rows and columns option
Hope this helps someone!

- 11
- 1
If your SPSS version has no Custom Tables installed and you haven't collected money for that module yet then use the following (run this syntax):
*Note: please use variable names up to 8 characters long.
set mxloops 1000. /*in case your list of values is longer than 40
matrix.
get vars /vari= V1 V2 /names= names /miss= omit. /*V1 V2 here is your categorical variable(s)
comp vals= {1,2,3,4,5,99}. /*let this be the list of possible values shared by the variables
comp freq= make(ncol(vals),ncol(vars),0).
loop i= 1 to ncol(vals).
comp freq(i,:)= csum(vars=vals(i)).
end loop.
comp names= {'vals',names}.
print {t(vals),freq} /cnames= names /title 'Frequency'. /*here you are - the frequencies
print {t(vals),freq/nrow(vars)*100} /cnames= names /format f8.2 /title 'Percent'. /*and percents
end matrix.
*If variables have missing values, they are deleted listwise. To include missings, use
get vars /vari= V1 V2 /names= names /miss= -999. /*or other value
*To exclude missings individually from each variable, analyze by separate variables.

- 137
- 2
- 14