Reverse coding continuous variable

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

Reverse coding continuous variable

Ruth Berkowitz
This post has NOT been accepted by the mailing list yet.
This post was updated on .
Hi,
How can I reverse code a continuous variable, ranging from 1 to 10? (it has many intermediate valuse, such as 1.257, 5.74 ect...)
Thank you!
Ruth.
Reply | Threaded
Open this post in threaded view
|

Re: Reverse coding continuous variable

Andy W
If you multiply by -1 it is in reversed order. Then if you want to rescale it to the same 1-10 range you would simply need to add 11, so -10 becomes 1, -1 becomes 10, etc. So the code:

COMPUTE new = (-1*old) + 11.

should do the trick.
Andy W
apwheele@gmail.com
http://andrewpwheeler.wordpress.com/
Reply | Threaded
Open this post in threaded view
|

Re: Reverse coding continuous variable

Ruth Berkowitz
Thank you!
So, would you agree that a different (and perhaps simpler) compute order would be:
COMPUTE new= 11-old  
Is it the same order as you suggested?
Ruth. 

On Sat, Aug 5, 2017 at 4:13 PM, Andy W [via SPSSX Discussion] <[hidden email]> wrote:
If you multiply by -1 it is in reversed order. Then if you want to rescale it to the same 1-10 range you would simply need to add 11, so -10 becomes 1, -1 becomes 10, etc. So the code:

COMPUTE new = (-1*old) + 11.

should do the trick.


If you reply to this email, your message will be added to the discussion below:
http://spssx-discussion.1045642.n5.nabble.com/Reverse-coding-continuous-variable-tp5734615p5734616.html
To unsubscribe from Reverse coding continuous variable, click here.
NAML



--


Ruth Berkowitz, Ph.D. 

School of Social Work

University of Haifa, Israel

[hidden email] | [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Reverse coding continuous variable

Bruce Weaver
Administrator
Try this:

NEW FILE.
DATASET CLOSE ALL.
DATA LIST FREE / old (F2.0).
BEGIN DATA
1 2 3 4 5 6 7 8 9 10
END DATA.

COMPUTE new1 = (-1*old) + 11.
COMPUTE new2 = 11-old.
FORMATS new1 new2 (F2.0).
LIST.



Ruth Berkowitz wrote
Thank you!
So, would you agree that a different (and perhaps simpler) compute order
would be:
COMPUTE new= 11-old
Is it the same order as you suggested?
Ruth.

On Sat, Aug 5, 2017 at 4:13 PM, Andy W [via SPSSX Discussion] <
[hidden email]> wrote:

> If you multiply by -1 it is in reversed order. Then if you want to rescale
> it to the same 1-10 range you would simply need to add 11, so -10 becomes
> 1, -1 becomes 10, etc. So the code:
>
> COMPUTE new = (-1*old) + 11.
>
> should do the trick.
> Andy W
> [hidden email]
> http://andrewpwheeler.wordpress.com/
>
>
> ------------------------------
> If you reply to this email, your message will be added to the discussion
> below:
> http://spssx-discussion.1045642.n5.nabble.com/Reverse-
> coding-continuous-variable-tp5734615p5734616.html
> To unsubscribe from Reverse coding continuous variable, click here
> <http://spssx-discussion.1045642.n5.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=5734615&code=cnJ1dGhiZXJrb0BnbWFpbC5jb218NTczNDYxNXwxNjI3NTU5MjMz>
> .
> NAML
> <http://spssx-discussion.1045642.n5.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>



--


Ruth Berkowitz, Ph.D.

School of Social Work

University of Haifa, Israel

[hidden email] | [hidden email]
--
Bruce Weaver
bweaver@lakeheadu.ca
http://sites.google.com/a/lakeheadu.ca/bweaver/

"When all else fails, RTFM."

NOTE: My Hotmail account is not monitored regularly.
To send me an e-mail, please use the address shown above.
Reply | Threaded
Open this post in threaded view
|

Re: Reverse coding continuous variable

Ruth Berkowitz
Thank you for your advise!

On Tue, Aug 22, 2017 at 12:23 AM, Bruce Weaver [via SPSSX Discussion] <[hidden email]> wrote:
Try this:

NEW FILE.
DATASET CLOSE ALL.
DATA LIST FREE / old (F2.0).
BEGIN DATA
1 2 3 4 5 6 7 8 9 10
END DATA.

COMPUTE new1 = (-1*old) + 11.
COMPUTE new2 = 11-old.
FORMATS new1 new2 (F2.0).
LIST.



Ruth Berkowitz wrote
Thank you!
So, would you agree that a different (and perhaps simpler) compute order
would be:
COMPUTE new= 11-old
Is it the same order as you suggested?
Ruth.

On Sat, Aug 5, 2017 at 4:13 PM, Andy W [via SPSSX Discussion] <
[hidden email]> wrote:

> If you multiply by -1 it is in reversed order. Then if you want to rescale
> it to the same 1-10 range you would simply need to add 11, so -10 becomes
> 1, -1 becomes 10, etc. So the code:
>
> COMPUTE new = (-1*old) + 11.
>
> should do the trick.
> Andy W
> [hidden email]
> http://andrewpwheeler.wordpress.com/
>
>
> ------------------------------
> If you reply to this email, your message will be added to the discussion
> below:
> http://spssx-discussion.1045642.n5.nabble.com/Reverse-
> coding-continuous-variable-tp5734615p5734616.html
> To unsubscribe from Reverse coding continuous variable, click here
> <http://spssx-discussion.1045642.n5.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=5734615&code=cnJ1dGhiZXJrb0BnbWFpbC5jb218NTczNDYxNXwxNjI3NTU5MjMz>
> .
> NAML
> <http://spssx-discussion.1045642.n5.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>



--


Ruth Berkowitz, Ph.D.

School of Social Work

University of Haifa, Israel

[hidden email] | [hidden email]
--
Bruce Weaver
[hidden email]
http://sites.google.com/a/lakeheadu.ca/bweaver/

"When all else fails, RTFM."

NOTE: My Hotmail account is not monitored regularly.
To send me an e-mail, please use the address shown above.



If you reply to this email, your message will be added to the discussion below:
http://spssx-discussion.1045642.n5.nabble.com/Reverse-coding-continuous-variable-tp5734615p5734717.html
To unsubscribe from Reverse coding continuous variable, click here.
NAML



--


Ruth Berkowitz, Ph.D. 

School of Social Work

University of Haifa, Israel

[hidden email] | [hidden email]