Re: How to remove extraneous value labels. Keep only that actuallu occur in data.

Posted by Jon Peck on
URL: http://spssx-discussion.165.s1.nabble.com/How-to-remove-extraneous-value-labels-Keep-only-that-actuallu-occur-in-data-tp5739723p5739736.html

That assumes that all values are labelled,  The VALUELABEL function returns an empty string if the value does not have a value label.  (There is a Python function in the spssaux2.py module that can find unlabelled values.)

On Sat, Oct 3, 2020 at 7:44 PM Kathy Reinig <[hidden email]> wrote:

STRING labelvar (A120).
COMPUTE labelvar=VALUELABEL(var1). 

I would think that if you turned it back into a string, then autorecode that string you would be where you want to be.

Kathy Reinig
KJ Reinig Associates

On Oct 2, 2020, at 4:40 PM, Jon Peck <[hidden email]> wrote:

I think if you AUTORECODE again, the unused labels in the new variable would disappear.  Otherwise, this would take a small amount of Python code.  For CTABLE use, though, you can choose to exclude empty categories,so those phantom labels would never appear.

On Fri, Oct 2, 2020 at 2:01 PM Art Kendall <[hidden email]> wrote:
I am posting this question in case somebody has already worked this out.

I have variables with way too many value labels.  I received string
variables with mixed spellings, capitalizations, and even languages. I
AUTORECODEd and then RECODEd to collapse categories. So now there are labels
for values that do not occur in the data.

One kludge way to clean then up would be be to do
FREQUENCIES MISSING= INCLUDE.
Then highlight-copy-and-paste labels from the output file  into a  syntax
file.
Then edit that syntax file as a new set of value labels

Any suggestions?



-----
Art Kendall
Social Research Consultants
--
Sent from: http://spssx-discussion.1045642.n5.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


--
Jon K Peck
[hidden email]

===================== 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


--
Jon K Peck
[hidden email]

===================== 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