Page 1 of 1

Formula is mis-specified

Posted: Tue Mar 14, 2023 7:47 pm
by ClaireCups
Hi everyone :blush: , when I try to compute a new variable called "low Vit D-low iron" using this formula: if(VitD_recoded==0 & iron_recoded==0, 1, 0), Jamovi says "the formula is mis-specified". Do you know how can I let this formula work?

I have already tried these other options:
if(VitD_recoded==0 and iron_recoded==0, 1, 0),
IF(VitD_recoded==0 & iron_recoded==0, 1, 0),
Iif(VitD_recoded==0 AND iron_recoded==0, 1, 0).

Thank you so so much for your help,
Claire

Re: Formula is mis-specified

Posted: Tue Mar 14, 2023 9:42 pm
by MAgojam
Hey @ClaireCups,
you were almost there (here it is):

Code: Select all

IF(VitD_recoded==0 and iron_recoded==0, 1, 0)
Cheers,
Maurizio

Re: Formula is mis-specified

Posted: Wed Mar 15, 2023 9:26 am
by ClaireCups
Thank you so much, @MAgojam , it worked!! 😄

Cheers and thanks again,
Claire