Formula is mis-specified

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
ClaireCups
Posts: 4
Joined: Tue Mar 14, 2023 7:37 pm

Formula is mis-specified

Post 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
User avatar
MAgojam
Posts: 421
Joined: Thu Jun 08, 2017 2:33 pm
Location: Parma (Italy)

Re: Formula is mis-specified

Post 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
ClaireCups
Posts: 4
Joined: Tue Mar 14, 2023 7:37 pm

Re: Formula is mis-specified

Post by ClaireCups »

Thank you so much, @MAgojam , it worked!! 😄

Cheers and thanks again,
Claire
Post Reply