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)
not computing correctly
-
- Posts: 3
- Joined: Mon Aug 07, 2023 11:31 am
not computing correctly
- Attachments
-
- screenshot2.png (11.23 KiB) Viewed 2773 times
-
- screenshot.png (61.74 KiB) Viewed 2810 times
Last edited by statsdontlie on Tue Aug 08, 2023 5:38 am, edited 2 times in total.
Re: not computing correctly
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.
-
- Posts: 3
- Joined: Mon Aug 07, 2023 11:31 am
Re: not computing correctly
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.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.
Re: not computing correctly
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. Cheers,
Maurizio Agosti
https://www.jamovi.org/about.html
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. Cheers,
Maurizio Agosti
https://www.jamovi.org/about.html
-
- Posts: 3
- Joined: Mon Aug 07, 2023 11:31 am
Re: not computing correctly
Amazing! Thank you so much that worked!!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