how to compare different variable in the case? help :(

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

syckyip
Posts: 2
Joined: Tue Apr 05, 2016 2:16 am

how to compare different variable in the case? help :(

Postby syckyip » Tue Apr 05, 2016 2:33 am

:(
first thanks for your kindly help
here is the problem we encountered. We have 3 different variables( let's say A,B,C) for every cases , and we want to create a new variable (let's say V1 )that classifies different cases according to whether the case score highest in A,B,or C and sort them accordingly.
(for example, if case1 have A=1 B=2 C=1 , then the case belongs to B, and in V1, it will be B)
(another example, if case2 have A=4 B=2 C=2 , then the case belongs to A, and in V1, it will be A)

is there a way to create that variable effectively? we tried compare mean ,but it only generate a new table ,not a variable
many thanks :P
GerineL
Moderator
Posts: 1477
Joined: Tue Jun 10, 2008 4:50 pm

Re: how to compare different variable in the case? help :(

Postby GerineL » Tue Apr 05, 2016 10:15 am

look into the max function.
syckyip
Posts: 2
Joined: Tue Apr 05, 2016 2:16 am

Re: how to compare different variable in the case? help :(

Postby syckyip » Tue Apr 05, 2016 11:16 am

thanks for the reply :)
maybe I didn't explain myself clearly..yeah we tried Max function, but we are not merely trying to capture the value, so it doesn't work well
if we simply use max function, the below will be the result:
v1_v2_v3___target
1__4__2_____4
4__1__7_____7
2__6__9_____9
7__3__2_____7

but what we try to achieve is:
v1_v2_v3___target
1__4__2_____2(implying this case score highest in v2)
4__1__7_____3(implying this case score highest in v3)
2__6__9_____3
7__3__2_____1(implying this case score highest in v1)

we want a new variable that can show whether the case score highest in V1,V2,or V3, rather than directly capture the max value from v1,v2,v3, is that possible in SPSS? cuz otherwise we will have to deal with it manually (but we have like 400 cases)
GerineL
Moderator
Posts: 1477
Joined: Tue Jun 10, 2008 4:50 pm

Re: how to compare different variable in the case? help :(

Postby GerineL » Wed Apr 06, 2016 12:51 pm

then add something like:

Code: Select all

if (target = v1) target_2 = 1.
if (target = v2) target_2 = 2.
if (target = v3) target_2 = 3.
execute.
Note that this syntax just takes the latest variable if e.g. both 1 and 3 are equal to the max.
mikosha
Posts: 2
Joined: Wed May 18, 2016 5:27 am

Re: how to compare different variable in the case? help :(

Postby mikosha » Wed May 18, 2016 5:30 am

Hello everyone. I am a beginner at SPSS. and I do not get some points. E.g. I have Satisfaction scale. there are 4 questions. How I find out are they satisfied or not.
P.s. I have 3 factors, and 7 dimensions, 45 questions (including demographic data), how to analyze all of them. The main things to understand: r the ppl satisfied, r they committed and how these independent n mediating variables affect on the performance…

Who is online

Users browsing this forum: No registered users and 1 guest

cron