showing empty category

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

showing empty category

Lars Balzer
Hi all,

can anybody tell me how to show an empty category in a frequency table?

Example:
          N
1 red    289
2 yellow 18
3 blue   0 <----
4 green  7288

3 blue is not shown in the table; the same is true for crosstabs.

/MISSING=INCLUDE which I found in a posting from 2007 does not help,
because then missings are treated as valid.

Any ideas?

Best,
  Lars

=====================
To manage your subscription to SPSSX-L, send a message to
[hidden email] (not to SPSSX-L), with no body text except the
command. To leave the list, send the command
SIGNOFF SPSSX-L
For a list of commands to manage subscriptions, send the command
INFO REFCARD
Reply | Threaded
Open this post in threaded view
|

Re: showing empty category

Bruce Weaver
Administrator
Lars Balzer wrote
Hi all,

can anybody tell me how to show an empty category in a frequency table?

Example:
          N
1 red    289
2 yellow 18
3 blue   0 <----
4 green  7288

3 blue is not shown in the table; the same is true for crosstabs.

/MISSING=INCLUDE which I found in a posting from 2007 does not help,
because then missings are treated as valid.

Any ideas?

Best,
  Lars
Unfortunately, I don't think there is a straightforward way to get what you want.  Here are some not so straightforward things you could try.

1. Cross-tabulate your variable with a constant, and use the "integer mode" for CROSSTABS.*
2. Send the output from FREQUENCIES to a data set with OMS, them merge that file (via MATCH FILES) with another file that has all of the values you want in the table, and recode SYSMIS to 0.
3. Use DATA LIST to read in the values and counts for the table (like the ones you show above), recode 0 to a very small value (e.g., 0.00001), and WEIGHT by COUNT, etc.

* It would be nice if FREQUENCIES also had an integer mode.

HTH.

--
Bruce Weaver
bweaver@lakeheadu.ca
http://sites.google.com/a/lakeheadu.ca/bweaver/

"When all else fails, RTFM."

PLEASE NOTE THE FOLLOWING: 
1. My Hotmail account is not monitored regularly. To send me an e-mail, please use the address shown above.
2. The SPSSX Discussion forum on Nabble is no longer linked to the SPSSX-L listserv administered by UGA (https://listserv.uga.edu/).
Reply | Threaded
Open this post in threaded view
|

Re: showing empty category

Jon K Peck

Don't forget the CTABLES, if you have the Custom Tables option, will do this very easily.
Jon Peck
SPSS, an IBM Company
[hidden email]
312-651-3435



From: Bruce Weaver <[hidden email]>
To: [hidden email]
Date: 02/01/2010 03:19 PM
Subject: Re: [SPSSX-L] showing empty category
Sent by: "SPSSX(r) Discussion" <[hidden email]>





Lars Balzer wrote:
>
> Hi all,
>
> can anybody tell me how to show an empty category in a frequency table?
>
> Example:
>           N
> 1 red    289
> 2 yellow 18
> 3 blue   0 <----
> 4 green  7288
>
> 3 blue is not shown in the table; the same is true for crosstabs.
>
> /MISSING=INCLUDE which I found in a posting from 2007 does not help,
> because then missings are treated as valid.
>
> Any ideas?
>
> Best,
>   Lars
>
>

Unfortunately, I don't think there is a straightforward way to get what you
want.  Here are some not so straightforward things you could try.

1. Cross-tabulate your variable with a constant, and use the "integer mode"
for CROSSTABS.*
2. Send the output from FREQUENCIES to a data set with OMS, them merge that
file (via MATCH FILES) with another file that has all of the values you want
in the table, and recode SYSMIS to 0.
3. Use DATA LIST to read in the values and counts for the table (like the
ones you show above), recode 0 to a very small value (e.g., 0.00001), and
WEIGHT by COUNT, etc.

* It would be nice if FREQUENCIES also had an integer mode.

HTH.



-----
--
Bruce Weaver
[hidden email]
http://sites.google.com/a/lakeheadu.ca/bweaver/
"When all else fails, RTFM."

NOTE:  My Hotmail account is not monitored regularly.
To send me an e-mail, please use the address shown above.
--
View this message in context:
http://old.nabble.com/showing-empty-category-tp27411414p27412356.html
Sent from the SPSSX Discussion mailing list archive at Nabble.com.

=====================
To manage your subscription to SPSSX-L, send a message to
[hidden email] (not to SPSSX-L), with no body text except the
command. To leave the list, send the command
SIGNOFF SPSSX-L
For a list of commands to manage subscriptions, send the command
INFO REFCARD


Reply | Threaded
Open this post in threaded view
|

Re: showing empty category

Hector Maletta
In reply to this post by Bruce Weaver
There is a simpler way: create a new case with the value for "blue", then
create a weighting variable (if you do not have one already). The new case
should get a very small weight, such as 0.001, while other cases receive a
weight of 1 (or whatever weight they already have). Then use that variable
for weighting. SPSS would round the new case to zero frequency (1 x 0.001),
but the category will appear in the table.
The new case may be added manually in the data editor, taking care that it
has valid (though relatively small) values in all relevant variables (do not
leave the variables blank, or they would be excluded as system missing). The
values should be such that their weighted rounded values are all zero (e.g.
values <10).
Hector


-----Original Message-----
From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of
Bruce Weaver
Sent: 01 February 2010 19:15
To: [hidden email]
Subject: Re: showing empty category

Lars Balzer wrote:

>
> Hi all,
>
> can anybody tell me how to show an empty category in a frequency table?
>
> Example:
>           N
> 1 red    289
> 2 yellow 18
> 3 blue   0 <----
> 4 green  7288
>
> 3 blue is not shown in the table; the same is true for crosstabs.
>
> /MISSING=INCLUDE which I found in a posting from 2007 does not help,
> because then missings are treated as valid.
>
> Any ideas?
>
> Best,
>   Lars
>
>

Unfortunately, I don't think there is a straightforward way to get what you
want.  Here are some not so straightforward things you could try.

1. Cross-tabulate your variable with a constant, and use the "integer mode"
for CROSSTABS.*
2. Send the output from FREQUENCIES to a data set with OMS, them merge that
file (via MATCH FILES) with another file that has all of the values you want
in the table, and recode SYSMIS to 0.
3. Use DATA LIST to read in the values and counts for the table (like the
ones you show above), recode 0 to a very small value (e.g., 0.00001), and
WEIGHT by COUNT, etc.

* It would be nice if FREQUENCIES also had an integer mode.

HTH.



-----
--
Bruce Weaver
[hidden email]
http://sites.google.com/a/lakeheadu.ca/bweaver/
"When all else fails, RTFM."

NOTE:  My Hotmail account is not monitored regularly.
To send me an e-mail, please use the address shown above.
--
View this message in context:
http://old.nabble.com/showing-empty-category-tp27411414p27412356.html
Sent from the SPSSX Discussion mailing list archive at Nabble.com.

=====================
To manage your subscription to SPSSX-L, send a message to
[hidden email] (not to SPSSX-L), with no body text except the
command. To leave the list, send the command
SIGNOFF SPSSX-L
For a list of commands to manage subscriptions, send the command
INFO REFCARD

=====================
To manage your subscription to SPSSX-L, send a message to
[hidden email] (not to SPSSX-L), with no body text except the
command. To leave the list, send the command
SIGNOFF SPSSX-L
For a list of commands to manage subscriptions, send the command
INFO REFCARD
Reply | Threaded
Open this post in threaded view
|

Re: showing empty category

ViAnn Beadle
In reply to this post by Bruce Weaver
CTABLES will do it provided that a value label is defined for the empty
category.

-----Original Message-----
From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of
Bruce Weaver
Sent: Monday, February 01, 2010 3:15 PM
To: [hidden email]
Subject: Re: showing empty category

Lars Balzer wrote:

>
> Hi all,
>
> can anybody tell me how to show an empty category in a frequency table?
>
> Example:
>           N
> 1 red    289
> 2 yellow 18
> 3 blue   0 <----
> 4 green  7288
>
> 3 blue is not shown in the table; the same is true for crosstabs.
>
> /MISSING=INCLUDE which I found in a posting from 2007 does not help,
> because then missings are treated as valid.
>
> Any ideas?
>
> Best,
>   Lars
>
>

Unfortunately, I don't think there is a straightforward way to get what you
want.  Here are some not so straightforward things you could try.

1. Cross-tabulate your variable with a constant, and use the "integer mode"
for CROSSTABS.*
2. Send the output from FREQUENCIES to a data set with OMS, them merge that
file (via MATCH FILES) with another file that has all of the values you want
in the table, and recode SYSMIS to 0.
3. Use DATA LIST to read in the values and counts for the table (like the
ones you show above), recode 0 to a very small value (e.g., 0.00001), and
WEIGHT by COUNT, etc.

* It would be nice if FREQUENCIES also had an integer mode.

HTH.



-----
--
Bruce Weaver
[hidden email]
http://sites.google.com/a/lakeheadu.ca/bweaver/
"When all else fails, RTFM."

NOTE:  My Hotmail account is not monitored regularly.
To send me an e-mail, please use the address shown above.
--
View this message in context:
http://old.nabble.com/showing-empty-category-tp27411414p27412356.html
Sent from the SPSSX Discussion mailing list archive at Nabble.com.

=====================
To manage your subscription to SPSSX-L, send a message to
[hidden email] (not to SPSSX-L), with no body text except the
command. To leave the list, send the command SIGNOFF SPSSX-L For a list of
commands to manage subscriptions, send the command INFO REFCARD

=====================
To manage your subscription to SPSSX-L, send a message to
[hidden email] (not to SPSSX-L), with no body text except the
command. To leave the list, send the command
SIGNOFF SPSSX-L
For a list of commands to manage subscriptions, send the command
INFO REFCARD
Reply | Threaded
Open this post in threaded view
|

Re: showing empty category

Bruce Weaver
Administrator
Ah, OK.  That's more like it.  But isn't it about time that FREQUENCIES had this feature too?  


ViAnn Beadle wrote
CTABLES will do it provided that a value label is defined for the empty
category.

-----Original Message-----
From: SPSSX(r) Discussion [mailto:SPSSX-L@LISTSERV.UGA.EDU] On Behalf Of
Bruce Weaver
Sent: Monday, February 01, 2010 3:15 PM
To: SPSSX-L@LISTSERV.UGA.EDU
Subject: Re: showing empty category

Lars Balzer wrote:
>
> Hi all,
>
> can anybody tell me how to show an empty category in a frequency table?
>
> Example:
>           N
> 1 red    289
> 2 yellow 18
> 3 blue   0 <----
> 4 green  7288
>
> 3 blue is not shown in the table; the same is true for crosstabs.
>
> /MISSING=INCLUDE which I found in a posting from 2007 does not help,
> because then missings are treated as valid.
>
> Any ideas?
>
> Best,
>   Lars
>
>

Unfortunately, I don't think there is a straightforward way to get what you
want.  Here are some not so straightforward things you could try.

1. Cross-tabulate your variable with a constant, and use the "integer mode"
for CROSSTABS.*
2. Send the output from FREQUENCIES to a data set with OMS, them merge that
file (via MATCH FILES) with another file that has all of the values you want
in the table, and recode SYSMIS to 0.
3. Use DATA LIST to read in the values and counts for the table (like the
ones you show above), recode 0 to a very small value (e.g., 0.00001), and
WEIGHT by COUNT, etc.

* It would be nice if FREQUENCIES also had an integer mode.

HTH.



-----
--
Bruce Weaver
bweaver@lakeheadu.ca
http://sites.google.com/a/lakeheadu.ca/bweaver/
"When all else fails, RTFM."

NOTE:  My Hotmail account is not monitored regularly.
To send me an e-mail, please use the address shown above.
--
View this message in context:
http://old.nabble.com/showing-empty-category-tp27411414p27412356.html
Sent from the SPSSX Discussion mailing list archive at Nabble.com.

=====================
To manage your subscription to SPSSX-L, send a message to
LISTSERV@LISTSERV.UGA.EDU (not to SPSSX-L), with no body text except the
command. To leave the list, send the command SIGNOFF SPSSX-L For a list of
commands to manage subscriptions, send the command INFO REFCARD

=====================
To manage your subscription to SPSSX-L, send a message to
LISTSERV@LISTSERV.UGA.EDU (not to SPSSX-L), with no body text except the
command. To leave the list, send the command
SIGNOFF SPSSX-L
For a list of commands to manage subscriptions, send the command
INFO REFCARD
--
Bruce Weaver
bweaver@lakeheadu.ca
http://sites.google.com/a/lakeheadu.ca/bweaver/

"When all else fails, RTFM."

PLEASE NOTE THE FOLLOWING: 
1. My Hotmail account is not monitored regularly. To send me an e-mail, please use the address shown above.
2. The SPSSX Discussion forum on Nabble is no longer linked to the SPSSX-L listserv administered by UGA (https://listserv.uga.edu/).
Reply | Threaded
Open this post in threaded view
|

Re: showing empty category

P.van Groenestijn
In reply to this post by Lars Balzer
Good morning!

The "famous" trick to show 0-values in a frequency table is to use a
weight variabele.
Give all cases a weight of 1 and add one case (the case with the value
0) with a very small weight, for example 0,00001.

Best Regard,
Pieter van Groenestijn




RadboudUniversiteit Nijmegen
Faculteit Sociale Wetenschappen
Research Technische OndersteuningsGroep
Thomas van Aquinostraat 4.00.51
tel: 024-3612035
fax: 024-3612351
email: [hidden email]
hp: http://www.ru.nl/fsw/rtog/



Lars Balzer wrote:

> Hi all,
>
> can anybody tell me how to show an empty category in a frequency table?
>
> Example:
>          N
> 1 red    289
> 2 yellow 18
> 3 blue   0 <----
> 4 green  7288
>
> 3 blue is not shown in the table; the same is true for crosstabs.
>
> /MISSING=INCLUDE which I found in a posting from 2007 does not help,
> because then missings are treated as valid.
>
> Any ideas?
>
> Best,
>  Lars
>
> =====================
> To manage your subscription to SPSSX-L, send a message to
> [hidden email] (not to SPSSX-L), with no body text except the
> command. To leave the list, send the command
> SIGNOFF SPSSX-L
> For a list of commands to manage subscriptions, send the command
> INFO REFCARD
>

=====================
To manage your subscription to SPSSX-L, send a message to
[hidden email] (not to SPSSX-L), with no body text except the
command. To leave the list, send the command
SIGNOFF SPSSX-L
For a list of commands to manage subscriptions, send the command
INFO REFCARD
Reply | Threaded
Open this post in threaded view
|

Re: showing empty category

Lars Balzer
In reply to this post by Lars Balzer
Thanks to all of you who gave me some ideas.
I will check them out.

Best,
Lars


Lars Balzer schrieb:

> Hi all,
>
> can anybody tell me how to show an empty category in a frequency table?
>
> Example:
>          N
> 1 red    289
> 2 yellow 18
> 3 blue   0 <----
> 4 green  7288
>
> 3 blue is not shown in the table; the same is true for crosstabs.
>
> /MISSING=INCLUDE which I found in a posting from 2007 does not help,
> because then missings are treated as valid.
>
> Any ideas?
>
> Best,
>  Lars

=====================
To manage your subscription to SPSSX-L, send a message to
[hidden email] (not to SPSSX-L), with no body text except the
command. To leave the list, send the command
SIGNOFF SPSSX-L
For a list of commands to manage subscriptions, send the command
INFO REFCARD