Page 1 of 1

Arg Max

Posted: Sat Jan 15, 2022 3:40 pm
by Plus
Hello together,

I hope to find help here. I tried to type in the "arg max" function which is supposed to select the maximum of a number of variables and to display the maximum with the name of the variable and not the value itself. Unfortunately, it doesn't work in Jamovi. Does anyone know which function I have to use in Jamovi?
Thanks for your help.

Re: Arg Max

Posted: Mon Jan 17, 2022 10:56 pm
by jonathon
hi,

i don't think there's a straight-forward way to achieve that in jamovi. some nested IF statements is probably your best option -- but i appreciate it's not terrible elegant.
Screen Shot 2022-01-18 at 09.55.29.png
Screen Shot 2022-01-18 at 09.55.29.png (595.38 KiB) Viewed 2034 times

Re: Arg Max

Posted: Wed Jan 19, 2022 1:48 pm
by mcfanda@gmail.com
Hi
you can try
=MATCH(MAX(A,B,C),A,B,C)
This will return the index of the variable containing the max (with 1=A,2=B,3=C, etc)

Re: Arg Max

Posted: Wed Jan 19, 2022 11:49 pm
by jonathon
oh, that's a good suggestion ... and then if you really wanted the 'A', 'B', 'C' thing, you could recode *that* variable into 1='A', 2='B', 3='C'

jonathon

Re: Arg Max

Posted: Sat Jan 22, 2022 8:51 am
by Plus
Thanks a lot to both of you! That worked perfectly fine.