I have trace fear conditioning data and I am using DCM as suggested in this case. After running the first level and contrasts, I went on with the second level. The output graph of reporting 2nd level was produced fine but only when looking at the 2nd level file did I realize that only a part of my subjects were included (less than half). However, I did not get any warning when running the 2nd Level to notify me about it.
Trying to figure it out, I saw that the subjects excluded had 1-3 trials that had not been estimated. The corresponding dcm.stats entry and as a result the dcm.con(i).con were NaN in these cases. Again, I did not get any error when running the 1st level of these subjects.
Do you know why this might be happening? Please let me know in case you need more information/files/code.
Thank you very much in advance for your help.
Kind regards,
Maria
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Thank you for explaining the issue with us.
To allow us resolve this issue for you, could you please provide some information that can better demonstrate how the issue appears and are really helpful for us to investigate the issue, as below?
Which version of PsPM did you use, e.g. 5.1 or 6.0? You can find this by typing “pspm” in the command line or find it at the bottom of the main GUI.
How was the data processed, through the GUI or through the command line scripts?
Can we have some materials to reproduce the error? If you are using the latest version of PsPM, it may be some issues in the code that have not been resolved in our previous bug fixes.
We look forward to your feedbacks.
Many thanks.
All the best.
Teddy
Research Assistant: Programmer
PsPM Team, Bach Lab, University College London
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I managed to find out why this was happening so I will explain here in case it is useful for other users.
My experiment included EDA and fMRI. I thus trimmed the EDA files based on the first non-dummy MRI trigger and the last MRI trigger because each of the experiment tasks was in a separate MRI run. However, trimming at the last trigger apparently did not leave enough time for the DCM to consider it as the window where it would look for the SCR after a CS. This is still puzzling me as the MRI sequence was being stopped only at the end of the task, including the whole "trace" period after the CS. In any case, all trials that were not estimated by the first level DCM were the task's last trials. Because of that, I decided to leave a longer buffer in the EDA data at the end of the task and run the first level again. No NaNs were produced and all trials were estimated so my problem is solved.
However, I think it would be very useful if there was a warning when one or more trials are not able to be estimated in the first level resulting in NaN values. It would also be useful to notify the user when not all 1st-level files specified in the 2nd level are used, because some of them contain NaNs. This way the user would be aware of the issue more directly.
As for what I have been using in my case:
PsPM version 5.1.1
The data was already trimmed (in .mat files) so trimming was not done with PsPM. I imported them into PsPM using a script as instructed in the Manual. The 1st level and contrasts were also done via a script. The 2nd Level and 2nd Level report I did through the GUI.
Thank you again very much for your support.
All the best,
Maria
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Thank you for the feedbacks. After checking the record of previous developments, I can see we designed the second level to give the warning, but the first level contrast did not give the warning. I have proposed an issue on GitHub and will add this warning for first level contrast in our PsPM develop version. We will let you know when the feature has been added so that you can use the beta version if you would like to. Hope it helps.
Many thanks.
Best wishes
Teddy
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Dear professor Bach,
I have trace fear conditioning data and I am using DCM as suggested in this case. After running the first level and contrasts, I went on with the second level. The output graph of reporting 2nd level was produced fine but only when looking at the 2nd level file did I realize that only a part of my subjects were included (less than half). However, I did not get any warning when running the 2nd Level to notify me about it.
Trying to figure it out, I saw that the subjects excluded had 1-3 trials that had not been estimated. The corresponding dcm.stats entry and as a result the dcm.con(i).con were NaN in these cases. Again, I did not get any error when running the 1st level of these subjects.
Do you know why this might be happening? Please let me know in case you need more information/files/code.
Thank you very much in advance for your help.
Kind regards,
Maria
Dear Maria,
Thank you for explaining the issue with us.
To allow us resolve this issue for you, could you please provide some information that can better demonstrate how the issue appears and are really helpful for us to investigate the issue, as below?
We look forward to your feedbacks.
Many thanks.
All the best.
Teddy
Research Assistant: Programmer
PsPM Team, Bach Lab, University College London
Dear Teddy,
Thank you very much for your prompt response.
I managed to find out why this was happening so I will explain here in case it is useful for other users.
My experiment included EDA and fMRI. I thus trimmed the EDA files based on the first non-dummy MRI trigger and the last MRI trigger because each of the experiment tasks was in a separate MRI run. However, trimming at the last trigger apparently did not leave enough time for the DCM to consider it as the window where it would look for the SCR after a CS. This is still puzzling me as the MRI sequence was being stopped only at the end of the task, including the whole "trace" period after the CS. In any case, all trials that were not estimated by the first level DCM were the task's last trials. Because of that, I decided to leave a longer buffer in the EDA data at the end of the task and run the first level again. No NaNs were produced and all trials were estimated so my problem is solved.
However, I think it would be very useful if there was a warning when one or more trials are not able to be estimated in the first level resulting in NaN values. It would also be useful to notify the user when not all 1st-level files specified in the 2nd level are used, because some of them contain NaNs. This way the user would be aware of the issue more directly.
As for what I have been using in my case:
Thank you again very much for your support.
All the best,
Maria
Dear Maria,
Thank you for the feedbacks. After checking the record of previous developments, I can see we designed the second level to give the warning, but the first level contrast did not give the warning. I have proposed an issue on GitHub and will add this warning for first level contrast in our PsPM develop version. We will let you know when the feature has been added so that you can use the beta version if you would like to. Hope it helps.
Many thanks.
Best wishes
Teddy