Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

How to delete one particular value label

3,162 views
Skip to first unread message

Andreas Völp

unread,
Sep 30, 2003, 7:42:01 AM9/30/03
to
Dear Group:

How do I delete the label of one particular value of a variable using
command syntax, without affecting other value labels already defined for
that variable? I really mean "delete", not just replace the label by a blank
label (the effect should be the same as removing the label in the data
editor).

--
Liebe Grüße / Best regards,

Andreas Völp

psy consult scientific services
Frankfurt am Main - Germany


Dr Stephen K Tagg

unread,
Sep 30, 2003, 3:18:42 PM9/30/03
to
How can you tell the difference between a variable value that you've given
an empty label by
add value labels var001 1 "".
and one whose label you've deleted?

"Andreas Völp" <Andrea...@gmx.de> wrote in message
news:blbq6a$qpi$06$1...@news.t-online.com...

Andreas Völp

unread,
Sep 30, 2003, 4:26:33 PM9/30/03
to
Just take a look at the value labels dialog box in the data editor. When you
set the label to "" using, e. g.,

> add value labels var001 1 ""

the associated value is still there, i. e. SPSS "thinks" that the value "1"
has a label. There are procedures that utilize exactly that information to
determine which values to display and which to skip (e. g., CTABLES). For
such procedures, setting the label to "" won't help.

--
Liebe Grüße / Best regards,

Andreas Völp

psy consult scientific services
Frankfurt am Main - Germany

"Dr Stephen K Tagg" <ste...@tagg38.freeserve.co.uk> schrieb im Newsbeitrag
news:blckuj$vhc$1...@newsg3.svr.pol.co.uk...

Raynald Levesque

unread,
Oct 1, 2003, 10:01:41 PM10/1/03
to
On Tue, 30 Sep 2003 13:42:01 +0200, "Andreas Völp"
<Andrea...@gmx.de> wrote:

>Dear Group:
>
>How do I delete the label of one particular value of a variable using
>command syntax, without affecting other value labels already defined for
>that variable? I really mean "delete", not just replace the label by a blank
>label (the effect should be the same as removing the label in the data
>editor).

Hi

The following is only a description of a possible approach:

- Suppose you need to completely delete the label for the value 99 of
var1 .

- Backup your file. (Work with a copy).

- create a new variable (say vallab) containing the value labels
(using Reverse Autorecode.sbs which is available from SPSS as well as
from my site).

- delete cases where var1=99.

- sort cases by var1.
- aggregate cases by var1 keeping the first value of var1 and vallab.
- you now have everything required to write a syntax file containing a
VALUE LABELS command . (There are examples in my web site.)

- Reload your original data file and
INCLUDE the syntax defined above.

HTH

Raynald Levesque rlev...@videotron.ca
Visit My SPSS Pages: http://pages.infinit.net/rlevesqu/index.htm

Fred

unread,
Oct 2, 2003, 8:46:25 AM10/2/03
to
Personally I find that using the

add value label 99 ''.

does work in replacing the label. The question that springs to mind,
is why do you want to delete the label? If there is data with
particular value, then surely it has a meaning, even if it only
denotes that the data is missing? If there isn't data with that value,
then it will hardly ever be shown in output as the cases will be
supressed.

What is is that you are actually trying to achieve?

Fred


Raynald Levesque <rlev...@videotron.ca> wrote in message news:<571nnvg6cqnjlnv8o...@4ax.com>...

Andreas Völp

unread,
Oct 6, 2003, 1:37:32 AM10/6/03
to
Fred:

Procedures like CTABLES determine the categories of a variable to display by
the presence of value labels. To give you an example, Let's assume that we
have a variable in which missing data are coded as follows:

97 - not applicable
98 - unknown
99 - not done

Now we want to create a table in which we merge all these missing data codes
into one (let's also assume that we don't want to recode into a different
variable). If there is no way to get rid of the previously assigned labels,
CTABLES will always display the 3 categories (unless we specify that empty
categories will not be displayed - but then valid categories with counts of
zero will also be suppressed).

ADD VALUE LABELS x 97,98,99 ""

won't help because it replaces the previously assigned label by an empty
label (i. e., the procedure displays the code instead of the label).

--
Liebe Grüße / Best regards,

Andreas Völp

psy consult scientific services
Frankfurt am Main - Germany

"Fred" <fred....@lsc.gov.uk> schrieb im Newsbeitrag
news:a47c9584.0310...@posting.google.com...

0 new messages