question on recoding value labels

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

question on recoding value labels

Deepa Bhat
Hi everyone,

I am merging two datasets. I need to recode certain questions in the
baseline to match the answer choices in the follow-up.

Here is a sample syntax for recoding.

RECODE
  Mquest7a  (1=2)  (2=1)  (3=3) (4=20)  (7=4)    (8=11)  (10=9)  .
EXECUTE .

However when I do the frequency, the (4=20) and (7=4) are being
combined. Why is this?

Another code that this has happened to is:
RECODE
Mquest20a (1=1) (2=14) (3=2) (4=12) (5=15).
EXECUTE.

Is there a particular order that I need to do this?
Do I need to put in codes if the value was coded the same in both
datasets? (i.e. (12=12))

Thanks in advance,
Deepa

=====================
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: question on recoding value labels

Ruben P. Konig
Hello Deepa,

The only thing I can think of is that you may have, involuntary, run
your code twice. Do you have the same problem if you recode into a
variable with another name?

Ruben

Deepa Bhat schreef:

> Hi everyone,
>
> I am merging two datasets. I need to recode certain questions in the
> baseline to match the answer choices in the follow-up.
>
> Here is a sample syntax for recoding.
>
> RECODE
>   Mquest7a  (1=2)  (2=1)  (3=3) (4=20)  (7=4)    (8=11)  (10=9)  .
> EXECUTE .
>
> However when I do the frequency, the (4=20) and (7=4) are being
> combined. Why is this?
>
> Another code that this has happened to is:
> RECODE
> Mquest20a (1=1) (2=14) (3=2) (4=12) (5=15).
> EXECUTE.
>
> Is there a particular order that I need to do this?
> Do I need to put in codes if the value was coded the same in both
> datasets? (i.e. (12=12))
>
> Thanks in advance,
> Deepa
>
> =====================
> 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
>

--
Dr. Ruben P. Konig
Department of Communication      telephone +31 24 3615789/3612372
Radboud University Nijmegen      telefax +31 24 3613073
P. O. Box 9104
6500 HE  Nijmegen                [hidden email]
The Netherlands                  http://oase.uci.kun.nl/~rkonig

=====================
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: question on recoding value labels

Art Kendall
In reply to this post by Deepa Bhat
You used a recode without an *into *specification.
[unfortunately SPSS does not have a default setting to warn when you do
this.]
try something like this. (untested) it would avoid the dangerous act of
making it impossible to go back and refine your approach.
It also makes it impossible to double check on your recode specifications.


rename vars( mquest7a = oldmquest7a).

RECODE
  oldMquest7a  (1=2)  (2=1)  (3=3) (4=20)  (7=4)    (8=11)  (10=9)(else=copy) into Mquest7a.
crosstabs tables= oldmquest7a by mquest7a.

Art Kendall
Social Research Consultants

Deepa Bhat wrote:

> Hi everyone,
>
> I am merging two datasets. I need to recode certain questions in the
> baseline to match the answer choices in the follow-up.
>
> Here is a sample syntax for recoding.
>
>
> EXECUTE .
>
> However when I do the frequency, the (4=20) and (7=4) are being
> combined. Why is this?
>
> Another code that this has happened to is:
> RECODE
> Mquest20a (1=1) (2=14) (3=2) (4=12) (5=15).
> EXECUTE.
>
> Is there a particular order that I need to do this?
> Do I need to put in codes if the value was coded the same in both
> datasets? (i.e. (12=12))
>
> Thanks in advance,
> Deepa
>
> =====================
> 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
Art Kendall
Social Research Consultants
Reply | Threaded
Open this post in threaded view
|

Re: question on recoding value labels

Albert-Jan Roskam
I don't think that will work, unless you replace the
RENAME statement by:

compute oldmquest7a = mquest7a.

and then do the crosstab.

Cheers!!
Albert-Jan


--- Art Kendall <[hidden email]> wrote:

> You used a recode without an *into *specification.
> [unfortunately SPSS does not have a default setting
> to warn when you do
> this.]
> try something like this. (untested) it would avoid
> the dangerous act of
> making it impossible to go back and refine your
> approach.
> It also makes it impossible to double check on your
> recode specifications.
>
>
> rename vars( mquest7a = oldmquest7a).
>
> RECODE
>   oldMquest7a  (1=2)  (2=1)  (3=3) (4=20)  (7=4)
> (8=11)  (10=9)(else=copy) into Mquest7a.
> crosstabs tables= oldmquest7a by mquest7a.
>
> Art Kendall
> Social Research Consultants
>
> Deepa Bhat wrote:
> > Hi everyone,
> >
> > I am merging two datasets. I need to recode
> certain questions in the
> > baseline to match the answer choices in the
> follow-up.
> >
> > Here is a sample syntax for recoding.
> >
> >
> > EXECUTE .
> >
> > However when I do the frequency, the (4=20) and
> (7=4) are being
> > combined. Why is this?
> >
> > Another code that this has happened to is:
> > RECODE
> > Mquest20a (1=1) (2=14) (3=2) (4=12) (5=15).
> > EXECUTE.
> >
> > Is there a particular order that I need to do
> this?
> > Do I need to put in codes if the value was coded
> the same in both
> > datasets? (i.e. (12=12))
> >
> > Thanks in advance,
> > Deepa
> >
> > =====================
> > 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
>



      ____________________________________________________________________________________
Be a better friend, newshound, and
know-it-all with Yahoo! Mobile.  Try it now.  http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ

=====================
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: question on recoding value labels

Art Kendall
the into on the recode would do the same as the compute here.

Art
Albert-jan Roskam wrote:

> I don't think that will work, unless you replace the
> RENAME statement by:
>
> compute oldmquest7a = mquest7a.
>
> and then do the crosstab.
>
> Cheers!!
> Albert-Jan
>
>
> --- Art Kendall <[hidden email]> wrote:
>
>
>> You used a recode without an *into *specification.
>> [unfortunately SPSS does not have a default setting
>> to warn when you do
>> this.]
>> try something like this. (untested) it would avoid
>> the dangerous act of
>> making it impossible to go back and refine your
>> approach.
>> It also makes it impossible to double check on your
>> recode specifications.
>>
>>
>> rename vars( mquest7a = oldmquest7a).
>>
>> RECODE
>>   oldMquest7a  (1=2)  (2=1)  (3=3) (4=20)  (7=4)
>> (8=11)  (10=9)(else=copy) into Mquest7a.
>> crosstabs tables= oldmquest7a by mquest7a.
>>
>> Art Kendall
>> Social Research Consultants
>>
>> Deepa Bhat wrote:
>>
>>> Hi everyone,
>>>
>>> I am merging two datasets. I need to recode
>>>
>> certain questions in the
>>
>>> baseline to match the answer choices in the
>>>
>> follow-up.
>>
>>> Here is a sample syntax for recoding.
>>>
>>>
>>> EXECUTE .
>>>
>>> However when I do the frequency, the (4=20) and
>>>
>> (7=4) are being
>>
>>> combined. Why is this?
>>>
>>> Another code that this has happened to is:
>>> RECODE
>>> Mquest20a (1=1) (2=14) (3=2) (4=12) (5=15).
>>> EXECUTE.
>>>
>>> Is there a particular order that I need to do
>>>
>> this?
>>
>>> Do I need to put in codes if the value was coded
>>>
>> the same in both
>>
>>> datasets? (i.e. (12=12))
>>>
>>> Thanks in advance,
>>> Deepa
>>>
>>> =====================
>>> 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
>>
>>
>
>
>
>       ____________________________________________________________________________________
> Be a better friend, newshound, and
> know-it-all with Yahoo! Mobile.  Try it now.  http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ
>
>
>

=====================
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
Art Kendall
Social Research Consultants