beginner question: calculating a score based on the maximum score on one of a set of variables

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

beginner question: calculating a score based on the maximum score on one of a set of variables

belle
Dear all,

How can I calculate a score based on the maximum score on one of a few
variables.

Lets say I have 3 variables with likert scale 1-5. I want the highest score
on either of the 3 variables. If I use Max(var1, var2, var2) I get all three
of the maximum scores, but I only want the highest score.

I feel stupid for asking, but I cant find it anywhere.

Regards,
Belle



--
Sent from: http://spssx-discussion.1045642.n5.nabble.com/

=====================
To manage your subscription to SPSSX-L, send a message to
[hidden email] (not to SPSSX-L), with no body text except the
command. To leave the list, send the command
SIGNOFF SPSSX-L
For a list of commands to manage subscriptions, send the command
INFO REFCARD
Reply | Threaded
Open this post in threaded view
|

Re: beginner question: calculating a score based on the maximum score on one of a set of variables

Mario Giesel-2
Don't understand.

 If I use Max(var1, var2, var2) I get all three
of the maximum scores, but I only want the highest score. 

You do get the highest score.
Maybe you give an example what you'd like to have?

Mario Giesel
Munich, Germany


Am Mittwoch, 17. Juli 2019, 00:05:21 MESZ hat belle <[hidden email]> Folgendes geschrieben:


Dear all,

How can I calculate a score based on the maximum score on one of a few
variables.

Lets say I have 3 variables with likert scale 1-5. I want the highest score
on either of the 3 variables. If I use Max(var1, var2, var2) I get all three
of the maximum scores, but I only want the highest score.

I feel stupid for asking, but I cant find it anywhere.

Regards,
Belle



--

=====================
To manage your subscription to SPSSX-L, send a message to
[hidden email] (not to SPSSX-L), with no body text except the
command. To leave the list, send the command
SIGNOFF SPSSX-L
For a list of commands to manage subscriptions, send the command
INFO REFCARD
===================== To manage your subscription to SPSSX-L, send a message to [hidden email] (not to SPSSX-L), with no body text except the command. To leave the list, send the command SIGNOFF SPSSX-L For a list of commands to manage subscriptions, send the command INFO REFCARD
Reply | Threaded
Open this post in threaded view
|

Re: beginner question: calculating a score based on the maximum score on one of a set of variables

Javier Figueroa
What I understood may serve you this or it may serve as a basis.

data list list
/var1 to var10.
begin data.
1 1 5 10 8 1 1 3 10 8
1 2 5 3 9 1 3 6 3 9
1 3 5 3 4 1 2 4 3 4
2 2 10 4 10 2 2 9 4 10
2 1 5 8 10 2 1 2 8 10
2 3 7 5 10 2 3 3 5 10
end data.
execute.

numeric id_xx(f8.0).
compute id_xx=$casenum.
execute.
variable level var1 to var10 (NOMINAL).
variable level ID_xx (scale).
VARIABLE LABELS var1 'COMPRAR'.
VARIABLE LABELS var2 'VAR 1'.
VARIABLE LABELS var3 'VAR 2'.
VARIABLE LABELS var4 'VAR 3'.
VARIABLE LABELS var5 'VAR 4'.
VARIABLE LABELS var6 'VAR 5'.
VARIABLE LABELS var7 'VAR 6'.
VARIABLE LABELS var8 'VAR 7'.
VARIABLE LABELS var9 'VAR 8'.
VARIABLE LABELS var10 'VAR 9'.

VARIABLE LABELS var1 'Sexo'.
VALUE LABELS var1
1 Masculino
2 Femenino.

VARIABLE LABELS var2 'Edad'.
VALUE LABELS var2
1 Edad 1
2 Edad 2
3 Edad 3.

VALUE LABELS var3 to var10
1 Pesimo
2 2
3 3
4 4
5 5
6 6
7 7
8 8
9 9
10 Excelente.

VARSTOCASES
  /ID=id
/MAKE escala1 FROM var3 var7
/MAKE escala2 FROM var4 var8
/MAKE escala3 FROM var5 var9
  /INDEX=Índice1(2)
  /KEEP=id_xx
var1
var2
  /NULL=DROP.

COMPUTE Mas_Alto=MAX(escala1,escala2,escala3).
EXECUTE.

compute resultado=0.

if Mas_Alto=escala1 resultado=1.
if Mas_Alto=escala2 resultado=2.
if Mas_Alto=escala3 resultado=3.
if Mas_Alto=escala1 and Mas_Alto=escala2 resultado=12.
if Mas_Alto=escala1 and Mas_Alto=escala3 resultado=13.
if Mas_Alto=escala2 and Mas_Alto=escala3 resultado=23.
EXECUTE.

Sincerely,

El mar., 16 jul. 2019 a las 21:38, Mario Giesel (<[hidden email]>) escribió:
Don't understand.

 If I use Max(var1, var2, var2) I get all three
of the maximum scores, but I only want the highest score. 

You do get the highest score.
Maybe you give an example what you'd like to have?

Mario Giesel
Munich, Germany


Am Mittwoch, 17. Juli 2019, 00:05:21 MESZ hat belle <[hidden email]> Folgendes geschrieben:


Dear all,

How can I calculate a score based on the maximum score on one of a few
variables.

Lets say I have 3 variables with likert scale 1-5. I want the highest score
on either of the 3 variables. If I use Max(var1, var2, var2) I get all three
of the maximum scores, but I only want the highest score.

I feel stupid for asking, but I cant find it anywhere.

Regards,
Belle



--

=====================
To manage your subscription to SPSSX-L, send a message to
[hidden email] (not to SPSSX-L), with no body text except the
command. To leave the list, send the command
SIGNOFF SPSSX-L
For a list of commands to manage subscriptions, send the command
INFO REFCARD
===================== To manage your subscription to SPSSX-L, send a message to [hidden email] (not to SPSSX-L), with no body text except the command. To leave the list, send the command SIGNOFF SPSSX-L For a list of commands to manage subscriptions, send the command INFO REFCARD


--
Javier Figueroa
Procesamiento y Análisis de bases de datos
Cel: 5927-4748 / 4970-1940
Casa: 2289-0184

===================== To manage your subscription to SPSSX-L, send a message to [hidden email] (not to SPSSX-L), with no body text except the command. To leave the list, send the command SIGNOFF SPSSX-L For a list of commands to manage subscriptions, send the command INFO REFCARD