Recoding variables into one column

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

Recoding variables into one column

Deepa Bhat
Hi everyone,

I had sent an email a while back about a database in which the data
entry staff entered the responses
 to one question in four different columns (q3_1a q3_1b q3_1c q3_1d).
The possible response are “1 yes”  or “2 no" or left blank (system
missing).  I would like to combine it all into one column (new q3_1).The
difference this time is that there is more than one response in each
row. The four responses in each row is affiliated with one hospital. So
the syntax that I used last time cannot be used (listed below) because
the latter variable will overwrite the previous one.

As someone stated very well, "this isn't a multiple-response answer;
it's a single-response answer, that's been represented in an apparent
multiple-response format."

The syntax that I used last time was:

RECODE
q3_1a
(1=1)  (2=2)  (99=99)  INTO  new3_1 .
RECODE
q3_1b
(1=1)  (2=2)  (99=99)  INTO  new3_1 .
RECODE
q3_1c
(1=1)  (2=2)  (99=99)  INTO  new3_1 .
RECODE
q3_1d
(1=1)  (2=2)  (99=99)  INTO  new3_1 .
VARIABLE LABELS new3_1 'Clean table or tray'.
EXECUTE .

It was suggested to use the Table or ctable option. I don't have it or
I couldn't do it.I would like to do it using syntax. How do I do it
using syntax?

Thanks so much,
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: Recoding variables into one column

Melissa Ives
Deepa,

Assuming that you are 100% positive that there are no multiple responses to this item and assuming that you really only care about positive responses (A "No" response would mean that one of the other options was endorsed)...Try this...

If (q3_1a=1) new3_1=1.
If (q3_1b=1) new3_1=2.
If (q3_1c=1) new3_1=3.
If (q3_1d=1) new3_1=4.
If (min.4(q3_a,q3_1b,q3_1c,qc_1d)=2) new3_1=0.
VARIABLE LABELS new3_1 'Clean table or tray'.
Value labels new3_1 1 'a' 2 'b' 3 'c' 4 'd' 0 'All=No'.

If they are all missing or only missing/no, then New3_1 should be missing.
Min.4 requires that all 4 have a valid response (no sysmis).

I noticed that you had 99 in the prior syntax--values of 99 in your data would change the syntax you would need to use.

Melissa

-----Original Message-----
From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of Deepa Bhat
Sent: Thursday, April 03, 2008 3:12 PM
To: [hidden email]
Subject: [SPSSX-L] Recoding variables into one column

Hi everyone,

I had sent an email a while back about a database in which the data entry staff entered the responses  to one question in four different columns (q3_1a q3_1b q3_1c q3_1d).
The possible response are "1 yes"  or "2 no" or left blank (system missing).  I would like to combine it all into one column (new q3_1).The difference this time is that there is more than one response in each row. The four responses in each row is affiliated with one hospital. So the syntax that I used last time cannot be used (listed below) because the latter variable will overwrite the previous one.

As someone stated very well, "this isn't a multiple-response answer; it's a single-response answer, that's been represented in an apparent multiple-response format."

The syntax that I used last time was:

RECODE
q3_1a
(1=1)  (2=2)  (99=99)  INTO  new3_1 .
RECODE
q3_1b
(1=1)  (2=2)  (99=99)  INTO  new3_1 .
RECODE
q3_1c
(1=1)  (2=2)  (99=99)  INTO  new3_1 .
RECODE
q3_1d
(1=1)  (2=2)  (99=99)  INTO  new3_1 .
VARIABLE LABELS new3_1 'Clean table or tray'.
EXECUTE .

It was suggested to use the Table or ctable option. I don't have it or I couldn't do it.I would like to do it using syntax. How do I do it using syntax?

Thanks so much,
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

PRIVILEGED AND CONFIDENTIAL INFORMATION
This transmittal and any attachments may contain PRIVILEGED AND
CONFIDENTIAL information and is intended only for the use of the
addressee. If you are not the designated recipient, or an employee
or agent authorized to deliver such transmittals to the designated
recipient, you are hereby notified that any dissemination,
copying or publication of this transmittal is strictly prohibited. If
you have received this transmittal in error, please notify us
immediately by replying to the sender and delete this copy from your
system. You may also call us at (309) 827-6026 for assistance.

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

Test for confidence interval on means

Nana Nadine
Thanks
  I there a test to calculate "mean scores" confidence level and confidence interval?
  Thanks,
  Nadine Nana


---------------------------------
You rock. That's why Blockbuster's offering you one month of Blockbuster Total Access, No Cost.

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