spssforum.com

by SPSS users, for SPSS users
SPSSVideoTutor.com
It is currently Sat May 25, 2013 6:49 pm

All times are UTC




Post new topic This topic is locked, you cannot edit posts or make further replies.  [ 5 posts ] 
Author Message
PostPosted: Mon Dec 15, 2008 8:30 pm 
Offline

Joined: Mon Dec 15, 2008 8:18 pm
Posts: 3
I have sales mix variables from 1 - 5 (Mix1-Mix5). They each represent a % of firm sales in each market channel:
Mix1 = retail
Mix2 = food service
Mix3 = institutional
Mix4 = industrial
Mix5 = other

I want to create a new variable that identifies which channel has the most sales (ex: MixMax = channel that accounts for most sales).

For example, if case #1 had the following:
Mix1 = 40
Mix2 = 10
Mix3 = 25
Mix4 = 25
Mix5 = 0

then MixMax = "Retail"

How do I do this in SPSS 16?
Any ideas on how to deal with ties (ex: Mix1 = 50 and Mix2 = 50 and all others =0)?


Top
 Profile  
 
 Post subject:
PostPosted: Mon Dec 15, 2008 9:28 pm 
Offline
Moderator

Joined: Tue Jun 12, 2007 12:08 pm
Posts: 2074
Location: Florida, USA
Under Compute there is a max function

Check it out and let us know if this is what you are looking for

_________________
NOTE: Please read the Posting Guidelines and always tell us your OS, the SPSS version and information about your study and data!


Statman
Statistical Services
IBM/SPSS Beta Site


Top
 Profile  
 
 Post subject:
PostPosted: Mon Dec 15, 2008 9:41 pm 
Offline

Joined: Mon Dec 15, 2008 8:18 pm
Posts: 3
The max function simply kicks back the maximum value. I want to note which of the variables has that value. So, for my original example I am trying to note that the largest sales channel for the respondent is the retail channel. Does that help clarify my question?


Top
 Profile  
 
 Post subject:
PostPosted: Mon Dec 15, 2008 10:20 pm 
Offline

Joined: Mon Dec 15, 2008 8:18 pm
Posts: 3
Okay, I finally figured out a way to get there. Here is what I did:

1. Created a MixMax variable by computing the max(mix1, mix2, mix3, mix4, mix5).
2. Created new variable MixMaj
3. Filtered data on condition mix1=MixMax
4. Recoded MixMaj - missing variable changed to 1
5. Repeated steps 3&4 for 2 - 5
6. Checked for equal splits by filtering all data on mix# = mix$

This worked. However, I am curious to know if there is another way to do this work. Any ideas?


Top
 Profile  
 
 Post subject:
PostPosted: Tue Dec 16, 2008 1:23 am 
Offline
Moderator

Joined: Tue Jun 12, 2007 12:08 pm
Posts: 2074
Location: Florida, USA
Well done

Thread closed


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic This topic is locked, you cannot edit posts or make further replies.  [ 5 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® Forum Software © phpBB Group