Hannah
Hannah

Reputation: 11

Crosstabs includes missing values

When I make a cross tab (using SPSS version 22), my missing values are included (see image below). This is something I do not want. If anyone could tell me how I could exclude the missing values that would be great :)

enter image description here

Upvotes: 1

Views: 2206

Answers (2)

user45392
user45392

Reputation: 622

As Martin mentioned, you need to set your user-missing values.

I'll just mention that for String variables (such as in your case), system-missing values (blanks) are not considered missing by default. If your variable were Numeric, blanks would automatically be considered missing.

To set empty values in a String variable to missing you can use:

MISSING VALUES comor_AF (" ") .

Edit: Martin's updated solution does the trick too.

Upvotes: 2

ragamuffin
ragamuffin

Reputation: 460

Edit: It looks like your variable como_af is a string. String variables do not have missing values, they just have blanks. You might want to consider recoding it into a numeric variable for easier analysis:

if como_af = "Yes" como_af_num = 1. 
if como_af = "No" como_af_num = 2. 
if como_af = "" como_af_num = $sysmis. 

or alternatively:

recode como_af ("Yes"=1) ("No"=2) (""=sysmis) into como_af_num.

now if you cross nihss_mild by como_af_num, the blanks (now sysmis) will be excluded.

Upvotes: 2

Related Questions