changing values labels into numeric numbers variable

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

changing values labels into numeric numbers variable

Daniel Stahl
Dear List,

I received a datafile where something went wrong while importing SPSS:
The values of the variables were imported as data labeles (e.g.age:
35,40,25,25 became a label: 2,3,1,1). I am now trying to get the value
labels (=age) as a normal numeric value.
Does anybody know a syntax command or other trick to change a value
label into a numeric number? The value labels columns are all numeric
and contain only values
Thanks a lot in advance
Daniel

--
http://www.fastmail.com - The professional email service

=====================
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: changing values labels into numeric numbers variable

David Marso
Administrator
Your missive does not parse well!!
Perhaps look at ALTER TYPE and VALUE LABEL functions?
Not sure exactly what you are requesting.
----
Daniel Stahl wrote
Dear List,

I received a datafile where something went wrong while importing SPSS:
The values of the variables were imported as data labeles (e.g.age:
35,40,25,25 became a label: 2,3,1,1). I am now trying to get the value
labels (=age) as a normal numeric value.
Does anybody know a syntax command or other trick to change a value
label into a numeric number? The value labels columns are all numeric
and contain only values
Thanks a lot in advance
Daniel

--
http://www.fastmail.com - The professional email service

=====================
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
Please reply to the list and not to my personal email.
Those desiring my consulting or training services please feel free to email me.
---
"Nolite dare sanctum canibus neque mittatis margaritas vestras ante porcos ne forte conculcent eas pedibus suis."
Cum es damnatorum possederunt porcos iens ut salire off sanguinum cliff in abyssum?"
Reply | Threaded
Open this post in threaded view
|

Re: changing values labels into numeric numbers variable

Maguin, Eugene
In reply to this post by Daniel Stahl
This seems really odd to me but .... Would you back up please and give a more complete narrative with respect to the following points: If you read the data file with spss, what was the exporting program and exported file type. If you read the file with spss, could you--somehow--have made a mistake reading the file? Or, is this a file that somebody else made (a talk with them, perhaps)?

As to the resulting spss datafile, there's a variable called age and in the data view is there a record with a value of 35? And in the variable view, is the text of the VARIABLE label or the VALUE label for age equal to "2,3,1,1"? The meaning of "data label" is ambiguous. Where does the "35,40,25,25" text appear at/come from





-----Original Message-----
From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of Daniel Stahl
Sent: Monday, August 17, 2015 12:38 PM
To: [hidden email]
Subject: changing values labels into numeric numbers variable

Dear List,

I received a datafile where something went wrong while importing SPSS:
The values of the variables were imported as data labeles (e.g.age:
35,40,25,25 became a label: 2,3,1,1). I am now trying to get the value labels (=age) as a normal numeric value.
Does anybody know a syntax command or other trick to change a value label into a numeric number? The value labels columns are all numeric and contain only values Thanks a lot in advance Daniel

--
http://www.fastmail.com - The professional email service

=====================
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: changing values labels into numeric numbers variable

Daniel Stahl
Dear Eugene and David, thnaks for trying to help me. My problem is that
I the recorded data are all changed to value labels. Please do not ask
me how this happened. I recived the file like this and do not know..
Unfortunately there is no raw datafile avaliable.
The variables in the file should look like this
 age . score ....
30      10.2
25       9.9
18       9.9
...
20      11.2

the numbers are not recorded as numbers but as value lables.

Value labels view:
age . score ....
1      1
2       2
3       2
...   ...
75      50

I would like to remove the lables 1 to 75 for age and repalce them with
the real age values (an similar for all other scores)


Best iwshes, Daniel

On Mon, Aug 17, 2015, at 06:32 PM, Maguin, Eugene wrote:

> This seems really odd to me but .... Would you back up please and give a
> more complete narrative with respect to the following points: If you read
> the data file with spss, what was the exporting program and exported file
> type. If you read the file with spss, could you--somehow--have made a
> mistake reading the file? Or, is this a file that somebody else made (a
> talk with them, perhaps)?
>
> As to the resulting spss datafile, there's a variable called age and in
> the data view is there a record with a value of 35? And in the variable
> view, is the text of the VARIABLE label or the VALUE label for age equal
> to "2,3,1,1"? The meaning of "data label" is ambiguous. Where does the
> "35,40,25,25" text appear at/come from
>
>
>
>
>
> -----Original Message-----
> From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of
> Daniel Stahl
> Sent: Monday, August 17, 2015 12:38 PM
> To: [hidden email]
> Subject: changing values labels into numeric numbers variable
>
> Dear List,
>
> I received a datafile where something went wrong while importing SPSS:
> The values of the variables were imported as data labeles (e.g.age:
> 35,40,25,25 became a label: 2,3,1,1). I am now trying to get the value
> labels (=age) as a normal numeric value.
> Does anybody know a syntax command or other trick to change a value label
> into a numeric number? The value labels columns are all numeric and
> contain only values Thanks a lot in advance Daniel
>
> --
> http://www.fastmail.com - The professional email service
>
> =====================
> 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

--
http://www.fastmail.com - The way an email service should be

=====================
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: changing values labels into numeric numbers variable

Maguin, Eugene
I am nearly utterly confused to understand this file. Is there any way you can post a very small piece of this spss datafile on nabble? I don't know what is involved in doing that but I think Bruce or David do.

Point by point response please.

a) What values does the data view show for age and score? Please list the values for the first five records.

b) Does the value labels cell in the variable view for age show 75 defined values. Does it show 50 defined values for score?

Gene Maguin

-----Original Message-----
From: Daniel Stahl [mailto:[hidden email]]
Sent: Monday, August 17, 2015 3:24 PM
To: Maguin, Eugene <[hidden email]>; [hidden email]
Subject: Re: changing values labels into numeric numbers variable

Dear Eugene and David, thnaks for trying to help me. My problem is that I the recorded data are all changed to value labels. Please do not ask me how this happened. I recived the file like this and do not know..
Unfortunately there is no raw datafile avaliable.
The variables in the file should look like this  age . score ....
30      10.2
25       9.9
18       9.9
...
20      11.2

the numbers are not recorded as numbers but as value lables.

Value labels view:
age . score ....
1      1
2       2
3       2
...   ...
75      50

I would like to remove the lables 1 to 75 for age and repalce them with the real age values (an similar for all other scores)


Best iwshes, Daniel

On Mon, Aug 17, 2015, at 06:32 PM, Maguin, Eugene wrote:

> This seems really odd to me but .... Would you back up please and give
> a more complete narrative with respect to the following points: If you
> read the data file with spss, what was the exporting program and
> exported file type. If you read the file with spss, could
> you--somehow--have made a mistake reading the file? Or, is this a file
> that somebody else made (a talk with them, perhaps)?
>
> As to the resulting spss datafile, there's a variable called age and
> in the data view is there a record with a value of 35? And in the
> variable view, is the text of the VARIABLE label or the VALUE label
> for age equal to "2,3,1,1"? The meaning of "data label" is ambiguous.
> Where does the "35,40,25,25" text appear at/come from
>
>
>
>
>
> -----Original Message-----
> From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf
> Of Daniel Stahl
> Sent: Monday, August 17, 2015 12:38 PM
> To: [hidden email]
> Subject: changing values labels into numeric numbers variable
>
> Dear List,
>
> I received a datafile where something went wrong while importing SPSS:
> The values of the variables were imported as data labeles (e.g.age:
> 35,40,25,25 became a label: 2,3,1,1). I am now trying to get the value
> labels (=age) as a normal numeric value.
> Does anybody know a syntax command or other trick to change a value
> label into a numeric number? The value labels columns are all numeric
> and contain only values Thanks a lot in advance Daniel
>
> --
> http://www.fastmail.com - The professional email service
>
> =====================
> 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

--
http://www.fastmail.com - The way an email service should be

=====================
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: changing values labels into numeric numbers variable

Rich Ulrich
In reply to this post by Daniel Stahl
It looks to me like someone exported "agegroup" instead of AGE.
Ones and twos are odd "data labels".

Since they are all numeric, the simple solution seems to be RECODE.

I definitely would either change all the variable names, or else copy the
original file (the one with the GROUP values) to a special place with a special
name, so that it would only be touched in emergencies.

--
Rich Ulrich

> Date: Mon, 17 Aug 2015 17:37:39 +0100

> From: [hidden email]
> Subject: changing values labels into numeric numbers variable
> To: [hidden email]
>
> Dear List,
>
> I received a datafile where something went wrong while importing SPSS:
> The values of the variables were imported as data labeles (e.g.age:
> 35,40,25,25 became a label: 2,3,1,1). I am now trying to get the value
> labels (=age) as a normal numeric value.
> Does anybody know a syntax command or other trick to change a value
> label into a numeric number? The value labels columns are all numeric
> and contain only values
> Thanks a lot in advance
> Daniel
>
===================== 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: changing values labels into numeric numbers variable

John F Hall
In reply to this post by Daniel Stahl
Daniel

Looks to me like you may need to recreate the data set.  Do you have the
original records?  How many cases do you have?  How many variables?  Seems
to be 75 cases and at least two variables (age, score) which is manageable
if you have the actual data written down somewhere.  Are the original data
available in pdf or Word format?  If you post me [off-list] I can have a
look for you.

John F Hall (Mr)
[Retired academic survey researcher]

Email:   [hidden email]  
Website: www.surveyresearch.weebly.com  
SPSS start page:  www.surveyresearch.weebly.com/1-survey-analysis-workshop




-----Original Message-----
From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of
Daniel Stahl
Sent: Monday, August 17, 2015 9:24 PM
To: [hidden email]
Subject: Re: changing values labels into numeric numbers variable

Dear Eugene and David, thnaks for trying to help me. My problem is that I
the recorded data are all changed to value labels. Please do not ask me how
this happened. I recived the file like this and do not know..
Unfortunately there is no raw datafile avaliable.
The variables in the file should look like this  age . score ....
30      10.2
25       9.9
18       9.9
...
20      11.2

the numbers are not recorded as numbers but as value lables.

Value labels view:
age . score ....
1      1
2       2
3       2
...   ...
75      50

I would like to remove the lables 1 to 75 for age and repalce them with the
real age values (an similar for all other scores)


Best iwshes, Daniel

On Mon, Aug 17, 2015, at 06:32 PM, Maguin, Eugene wrote:

> This seems really odd to me but .... Would you back up please and give
> a more complete narrative with respect to the following points: If you
> read the data file with spss, what was the exporting program and
> exported file type. If you read the file with spss, could
> you--somehow--have made a mistake reading the file? Or, is this a file
> that somebody else made (a talk with them, perhaps)?
>
> As to the resulting spss datafile, there's a variable called age and
> in the data view is there a record with a value of 35? And in the
> variable view, is the text of the VARIABLE label or the VALUE label
> for age equal to "2,3,1,1"? The meaning of "data label" is ambiguous.
> Where does the "35,40,25,25" text appear at/come from
>
>
>
>
>
> -----Original Message-----
> From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf
> Of Daniel Stahl
> Sent: Monday, August 17, 2015 12:38 PM
> To: [hidden email]
> Subject: changing values labels into numeric numbers variable
>
> Dear List,
>
> I received a datafile where something went wrong while importing SPSS:
> The values of the variables were imported as data labeles (e.g.age:
> 35,40,25,25 became a label: 2,3,1,1). I am now trying to get the value
> labels (=age) as a normal numeric value.
> Does anybody know a syntax command or other trick to change a value
> label into a numeric number? The value labels columns are all numeric
> and contain only values Thanks a lot in advance Daniel
>
> --
> http://www.fastmail.com - The professional email service
>
> =====================
> 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

--
http://www.fastmail.com - The way an email service should be

=====================
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: changing values labels into numeric numbers variable

Art Kendall
In reply to this post by Daniel Stahl

How did you get the data into SPSS?  What syntax did you use?

There are a few things that my e-spss suggests.

If you are seeing this in the data view window be sure that there is not a check indicating that variable labels should be displayed rather than variable values.

see if AUTORECODE gives you what you want.

Art Kendall
Social Research Consultants
Reply | Threaded
Open this post in threaded view
|

Re: changing values labels into numeric numbers variable

Richard Ristow
In reply to this post by Daniel Stahl
At 12:37 PM 8/17/2015, Daniel Stahl wrote:
>I received a datafile where something went wrong while importing SPSS:
>The values of the variables were imported as data labeles (e.g.age:
>35,40,25,25 became a label: 2,3,1,1). I am now trying to get the value
>labels (=age) as a normal numeric value.

How about this?  David Marso already suggested it:

NUMERIC RightAge (F3).
COMPUTE RightAge=NUMBER(VALUELABEL(age),F3).

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