Page 1 of 1

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

Posted: Fri Apr 23, 2021 8:46 am
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:

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

Posted: Sat Apr 24, 2021 11:21 am
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 6393 times

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

Posted: Thu May 06, 2021 6:45 pm
by helpme
THANK YOU so much!!!!