Page 1 of 1
not computing correctly
Posted: Mon Aug 07, 2023 11:39 am
by statsdontlie
In my study i have baseline and 3 follow-up timepoints (4month, 6-month, 12-month). I have participants who don't have a score for every follow-up timepoint. But i want to say 'Yes' if any of the follow-ups have a <= -3 change from baseline. And 'No' if any have >-3 instead. But somehow the code is producing Yes/No for only participants that have data across all timepoints. For example, in ROW7, there is a participant with just the 4month score but they have a >-3 score from baseline, which should produce 'No' but the column is empty. I tried many different codes but cannot understand what I am doing wrong. Please help!
Here is my current code: IF(4month - baseline <= -3 or 6month - baseline <= -3 or 12month - baseline <= -3, 'Yes', IF(4month - baseline > -3 or 6month - baseline > -3 or 12month- baseline > -3, 'No', 'No'))
Edit: I tried ignore_missing=1 but it doesn't seem to work in IF() functions (see photo below)
Re: not computing correctly
Posted: Mon Aug 07, 2023 1:18 pm
by Bobafett
I think the problem is that your code is expecting data to be present (either above or below a set value) - however, as these cases have an absence of a value, your code doesn't take this into account and so the outcome is left blank. Try including a reference to 'ignore_missing' or such like in your code and this might then include those with some blank columns.
Re: not computing correctly
Posted: Tue Aug 08, 2023 5:37 am
by statsdontlie
Bobafett wrote: ↑Mon Aug 07, 2023 1:18 pm
I think the problem is that your code is expecting data to be present (either above or below a set value) - however, as these cases have an absence of a value, your code doesn't take this into account and so the outcome is left blank. Try including a reference to 'ignore_missing' or such like in your code and this might then include those with some blank columns.
Hello, I've tried that too but it seems to only work outside of IF() functions. I've updated a screenshot of the error message it gave me when I tried to do that.
Re: not computing correctly
Posted: Tue Aug 08, 2023 1:51 pm
by MAgojam
Hey @statsdontlie,
would you like to take a look at the screenshot, i put a suggestion that might be what you are looking for to compute your new variable.

- ScreenShot_20230808154340.jpeg (203.17 KiB) Viewed 7269 times
Cheers,
Maurizio Agosti
https://www.jamovi.org/about.html
Re: not computing correctly
Posted: Wed Aug 09, 2023 6:13 am
by statsdontlie
MAgojam wrote: ↑Tue Aug 08, 2023 1:51 pm
Hey @statsdontlie,
would you like to take a look at the screenshot, i put a suggestion that might be what you are looking for to compute your new variable.
ScreenShot_20230808154340.jpeg
Cheers,
Maurizio Agosti
https://www.jamovi.org/about.html
Amazing! Thank you so much that worked!!