Combining variables based on key factors

Moderators: statman, Analyst Techy, andris, Fierce, GerineL, Smash

Posts: 1
Joined: Tue Mar 01, 2016 9:45 pm

Combining variables based on key factors

Postby forevryours78 » Tue Mar 01, 2016 10:10 pm

I am trying to combine certain parts of a variable based on another variable and cannot seem to figure out how to do it. I have one variable (V1, V5, V9) that is coded by groups (10-14, 20-21, 30-32, 40-41, 50-51, 60-62, 70, 80-89, 90) that each represent a specific area and then the other variable (V4, V8, V12) represent the usefulness of their respective counterpart. Across all participants and variables I am trying to get one variable that takes the variables as shown in the pic I attached into one variable so that only those that fit within each group are present for V4, V8 or V12 in my example.

So in the picture, I would want a new variable that takes all of the V4's, V8's, V12's that are 50-51 or 80-89, etc, into one variable to give:
(V13) 50-51 (V14) 80-89
6 10
1 6
1 7
10 6...etc.

Each line represents a different participant that may or may not have more than one of the items being analyzed, hence the reason for having more then 1 entry across the variable groups (V1/V4, V5/V8, V9/V12). Thanks for any help you can give me.

To make it easier to understand I have used boxes to show what I mean in red and purple.
You do not have the required permissions to view the files attached to this post.
Posts: 1477
Joined: Tue Jun 10, 2008 4:50 pm

Re: Combining variables based on key factors

Postby GerineL » Wed Mar 02, 2016 8:25 am

It is not yet totally clear to me how you create these new variables (i.e., what you want to do with it), but here is a tip to start with:

You can probably achieve this by a combination of if functions (if a certain condition is fulfilled, create a new variable with value **CENSORED**) and aggregate functions (which you can use to do things across a column instead of a row, e.g. add up something|).

If this is not yet helpful, could you please give some more information on how you get from your existing variables to the new variables (i.e., what calculation you want spss to do)?

Who is online

Users browsing this forum: No registered users and 2 guests