Transform Variable- Absolute Value of Source

General help and assistance with jamovi. Bug reports can be made at our issues page: https://github.com/jamovi/jamovi/issues . (If you're unsure feel free to discuss it here)
Post Reply
caitie11122
Posts: 2
Joined: Thu Feb 17, 2022 3:40 am

Transform Variable- Absolute Value of Source

Post by caitie11122 »

Hi,

I am trying to calculate the familywise error rate of a group of data, and basically all I want is to be able to create a transform that allows me to use if abs($source) > x use 1, else use 0. However, I am unable to add an absolute value command here.

I have made a workaround where I've made a compute variable of each t-test that's literally just taking the absolute value of it (the function is just =ABS(t1_2) etc) so that I can use this new variable abs(t1_2) as the source for my transform variable sig1_2, but this seems inefficient as I should be able to just do that absolute value within the transform as you can on SPSS.

I really really hate SPSS, but my tutor is forcing us to use it this term, so I've been trying to use Jamovi and translate the instructions over myself. This is the only hitch I've hit, and also the only place so far where I've seen SPSS be more efficient than Jamovi, so I'm hoping it's just because I'm missing whatever button lets me put "if abs($source) > 2.179, use 1" as the recode condition like I've tried to illustrate in the attached screenshot.

Thanks so much for your help!

Caitlyn
Attachments
Screen Shot 2022-02-17 at 2.46.23 pm.png
Screen Shot 2022-02-17 at 2.46.23 pm.png (54.31 KiB) Viewed 3845 times
caitie11122
Posts: 2
Joined: Thu Feb 17, 2022 3:40 am

Re: Transform Variable- Absolute Value of Source

Post by caitie11122 »

PS: I realise this step is just for calculating the per-comparison error rate, I said familywise because I need this step to be able to then add them up for the FWER
User avatar
MAgojam
Posts: 446
Joined: Thu Jun 08, 2017 2:33 pm
Location: Parma (Italy)

Re: Transform Variable- Absolute Value of Source

Post by MAgojam »

Hey @Caitlyn,
why not so with Compute, take a look:
Compute.PNG
Compute.PNG (35.33 KiB) Viewed 3832 times
Cheers,
Maurizio

Updated:
if you prefer to use TRANSFORM
Trasform.PNG
Trasform.PNG (10.17 KiB) Viewed 3787 times
Last edited by MAgojam on Fri Feb 18, 2022 7:57 pm, edited 1 time in total.
User avatar
jonathon
Posts: 2840
Joined: Fri Jan 27, 2017 10:04 am

Re: Transform Variable- Absolute Value of Source

Post by jonathon »

you could also use

IF $source > 2.179 use 1
IF $source < 2.179 use 1
ELSE use 0

IF $source > 2.179 or $source < 2.179 use 1
ELSE use 0

cheers
Post Reply