spssforum.com from users, for users

SPSSforum.com is the largest free SPSS help resource worldwide.
On this SPSS forum you are sure to get an answer to your question!
Join the forum and let other SPSS users help you.

Join the SPSS users Group on LinkedIn
Join the SPSS Users Group
on LinkedIn
 
SPSSforum.com is a forum for SPSS users. Ask any question you like about SPSS or statistics.

It is currently Wed Sep 08, 2010 6:12 am

All times are UTC




Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: Combining variables with formulas
PostPosted: Sat Feb 06, 2010 6:35 pm 
Offline

Joined: Sat Feb 06, 2010 6:16 pm
Posts: 2
I am using a very old version of SPSS (10.0) and I have two variables that I need to combine. The first variables is gender of owner (genown) and the next is % of ownership (percown). What I need to have is a new variable (we'll call it genbus) where:
if genown =1 and percown = <50 then genbus = 1 and
if genown =2 and percown = <50 then genbus = 2 and
if genown =1 and percown = 50 then genbus = 3
I hope this makes sense and please let me know if there is an EASY way to do this. If the easiest way is to use a newer version of SPSS let me know (I can probably access one on campus).
Thanks!
Ok think I may have found the answer...could I use transform - compute to do this? If so do I need to do each separately or can I do it all in one variable?


Top
 Profile  
 



 Post subject: Re: Combining variables with formulas
PostPosted: Thu Feb 11, 2010 6:03 am 
Offline
Moderator

Joined: Mon Apr 27, 2009 2:19 am
Posts: 278
Location: Melbourne, Australia, University
Hi, yes you could copy and paste code below into either a syntax window, or the window that appears using Transform>Compute.

IF(1) genbus=0.
IF (genown = 1 & percown <= 50) genbus=1.
IF (genown = 2 & percown <= 50) genbus=2.
IF (genown = 1 & percown = 50) genbus=1.
EXECUTE.

_________________
Analyst Techy

NOTES:
1. It is not ethical for me to provide complete answers to assignment/work solutions.
2. Any solutions I provide on this forum are free of charge, donations go towards the maintenance of the unaffiliated SPSS forum.


Top
 Profile  
 



Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
Template made by DEVPPL

This site is in no way connected with SPSS Inc. or any affiliate of SPPS Inc. The SPSS logo and products are owned by and copyrighted by SPSS Inc. The views expressed in the messages posted on this site are those of persons writing those comments and not necessarily those of the SPSSforum.com. SPSSforum.com does not vouch for the accuracy or truthfulness of any posted statement or opinion. The SPSSforum.com has, however, refrained from posting any item containing any statement known to be inaccurate, false or baseless.