including missing values in crosstabs?

Moderators: statman, Analyst Techy, andris, Fierce, GerineL, Smash

dyw_dsr
Posts: 2
Joined: Wed Oct 17, 2012 8:14 am

including missing values in crosstabs?

Postby dyw_dsr » Wed Oct 17, 2012 8:19 am

Hello.

I have a surveydataset containing missing cases (let just say var01 contains 10 missings out of 100 who answered the question var01).
When I tried to make a crosstabs of var01 * year, I'll get a crosstabs of only the 90 valid cases splitted up by year.
Is it possible to include the missing 10 cases in the tables (for calculating row percentage etc.).

Thanks for the help.

/Dan
Penguin_Knight
Posts: 473
Joined: Thu Apr 05, 2012 5:58 pm

Re: including missing values in crosstabs?

Postby Penguin_Knight » Wed Oct 17, 2012 11:17 am

Yes, add a line:

Code: Select all

/MISSING=INCLUDE
in the CROSSTAB syntax and you should be able to see them. This only works for user-defined missing, however. If you have system missing values, you may need to temporarily recode them into user-defined.

http://publib.boulder.ibm.com/infocente ... issing.htm
dyw_dsr
Posts: 2
Joined: Wed Oct 17, 2012 8:14 am

Re: including missing values in crosstabs?

Postby dyw_dsr » Wed Oct 17, 2012 11:49 am

My data structure is something like this:

[YEAR] VAR1
[2002] 1
[2002] .
[2002] 1
[2007] .
[2007] .
[2007] .

There is 1 missing value for 2002, while all 3 responses in 2007 are missings.
When I tried to make a crosstab og YEAR*VAR1 I only get the 2 valid observations in 2002:
YEAR
[2002]
VAR=1: 2

What I want is something like this:
YEAR
[2002][2007]
VAR=1 : 2 0
VAR=missing : 1 3

I get the same table even if I include the /missing=include option
Penguin_Knight
Posts: 473
Joined: Thu Apr 05, 2012 5:58 pm

Re: including missing values in crosstabs?

Postby Penguin_Knight » Wed Oct 17, 2012 3:52 pm

dyw_dsr wrote:My data structure is something like this:

[YEAR] VAR1
[2002] 1
[2002] .
[2002] 1
[2007] .
[2007] .
[2007] .

There is 1 missing value for 2002, while all 3 responses in 2007 are missings.
When I tried to make a crosstab og YEAR*VAR1 I only get the 2 valid observations in 2002:
YEAR
[2002]
VAR=1: 2

What I want is something like this:
YEAR
[2002][2007]
VAR=1 : 2 0
VAR=missing : 1 3

I get the same table even if I include the /missing=include option
Yes, I already said that it can only deal with USER-DEFINED MISSING, not system missing. In your case those missing values are system (with only a "."), you will need to recode them into a real unique number, and then name them as missing in the variable tag. Then the missing command in crosstab will work.

Who is online

Users browsing this forum: No registered users and 1 guest

cron