Is there a DO IF/ELSE IF function in jamovi?

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
helpme
Posts: 4
Joined: Tue Apr 20, 2021 9:19 am

Is there a DO IF/ELSE IF function in jamovi?

Post by helpme »

Hello

I have variables where each parent have answered, and now I want to combine these by selecting mothers responses (var_1) where there is and when there's not I want to select fathers (var_2) answers into one computed variable. With mothers variable as priority.

I have the syntax to do this in SPSS, but I can't manage to do it in Jamovi. Have tried IF function and to use "or", but I am doing something wrong.

In SPSS the syntax is:

DO IF (MISSING(var_1)~=1).
COMPUTE computed_newvariable = var_1

ELSE IF (MISSING(var_2)~=1).
COMPUTE computed_newvariable = var_2

ELSE.
COMPUTE computed_newvariable = var_1

Hope someone can help me and would appreciate it very much! :nerd:
User avatar
MAgojam
Posts: 421
Joined: Thu Jun 08, 2017 2:33 pm
Location: Parma (Italy)

Re: Is there a DO IF/ELSE IF function in jamovi?

Post by MAgojam »

Hi, @helpme.
Is the suggestion that I am attaching you with the screenshot what you were looking for?

Cheers,
Maurizio
Screenshot.PNG
Screenshot.PNG (57.95 KiB) Viewed 6208 times
helpme
Posts: 4
Joined: Tue Apr 20, 2021 9:19 am

Re: Is there a DO IF/ELSE IF function in jamovi?

Post by helpme »

THANK YOU so much!!!!
Post Reply