I am trying to analyze Galvanic Skin response data (collected from Biopac) using SCRalyze. The problem is for our task we have multiple sessions (3 to be exact). I want to calculate beta values for each conditions but I could not figure out the way analyze for multi session task. Should I have to concatenate multiple runs and then do the analysis OR, there is something already available in the toolbox that I am completely ignoring?
Thanks for help!!!
-Sabin
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
glad to help. If you want parameter estimates ("beta values") for each condition, across multiple sessions, it is easiest to just enter multiple sessions into one GLM. You can specify several sessions in the batch editor, and you need to provide one onset file and one data file per session.
You could also specify conditions that only include the events in one out of the three sessions, thus generating session-specific parameter estimates. Note, in this case, you still need to define the same conditions for all sessions, but you leave the onsets empty for those conditions that relate to another session. That is, if you have two conditions A and B, you will define 6 condition names: A1, A2, A3, B1, B2, B3. For session A, you leave onsets for A2, A3, B2, B3 empty.
Let me know if you have further questions.
Best
Dominik
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi Dr. Bach,
Thanks for the reply. Different question: I am having trouble understanding why the estimate values I get with option 'scrf', 'scrf1' and 'scrf2' are different. If, our task have four conditions say A B C D, option 'scrf' would give us estimates for conditions A,B,C,D and a constant term. For 'scrf1' option would give us estimates for conditions A+temopral derivatives (TD),B+TD,C+TD,D+TD and a constant term. And finally for 'scrf2'would give us estimates for conditions A+temopral derivatives (TD), +Dispersion derivative(DD), B+TD+DD,C+TD+DD,D+TD+DD and a constant term. I was assuming the estimate for condition should be same for all three options, but I get different estimates with three options. As an example when I use 'scrf' option I get
betas: 0.95, -1.56, 1.89, -0.06
when I use 'scrf1' option I get 0.97 15.9 -1.5 -5.06 1.89 13.9 -0.08 -0.79 -0.00089
when I use 'scrf2' option I get 1.53 15.3 -195.9 -1.4 -6.2 78.1 1.98 14.9 -27.4 -0.1 1.5 10.2 -0.08.
Thanks,
Sabin
Last edit: sabin 2015-04-06
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
if you had just one condition, then including derivatives should not change the parameter estimate of the first, "canonical" response function.
However, you have several conditions, and the derivatives of one condition will in general be slightly correlated with the canonical regressor of another condition.
PsPM has no way of explicitly removing linear dependence in the design matrix (it uses the matlab function "pinv"), unlike for example the software SPM. If they are very small, they will have only small impact on the parameter estimates.
You can check this using the "orthogonality plot" in the model review manager.
Hope this helps
Best wishes
Dominik
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I have a question regarding the session-specific parameter estimates. I created onset-files for each session, containing all conditions (24 names). "Onsets" also consists of 24 cells but I only filled the onset-vectors for one session in each file and left the others empty [], as it was suggested.
When I try to create a GLM using 4 data-files and 4 onset-files (I have 4 session), the following error appears:
"Getting data...
Warning: Multiple condition information invalid: Condition "conditionname" - onsets{2} must be a numeric vector. (onsets{2} is the first position of an empty field [])
In scr_get_timing at 152
In scr_glm at 253
In scr_cfg_run_glm_scr_at_125
...
Preparing & inverting model ... Failed 'GLM'
Improper index matrix reference.
In function "scr_glm" at line 364.
In function "scr_cfg_run_glm_scr" at line 125"
How did you avoid this issue with empty onset fields?
Many thanks,
Natalie
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I think I found the problem and uploaded some small changes into the svn repository. Could you please update your PsPM version to the latest version in the svn repository and check if the problem still occurs? If you do not use svn you can download the latest snapshot here: https://sourceforge.net/p/pspm/svn/HEAD/tarball?path=/trunk
best regards
Tobias
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Setting up the GLM worked now without any error. However, it does not look completely correct. It seems to take into account only the data from the files defined as the first session, as seen in the design matrix (attached).
I also attached the batch that I used for setting up the GLM for one participant.
Do you have an idea where the problem is?
I would like to try this out by myself. Could you please provide me the other files which are referred in the provided batch setup, so I can setup the GLM file by myself? It is also okay for me to have a simplified version with about 2 to 4 sessions - as long as I am able to reproduce the mentioned behaviour.
Best regards
Tobias
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I have sent you a message about the files. But I realized, when setting up the GLM, there is still one more Warning:
"Orthogonalisation error in event type #02 (#03,....)
Correlation coefficients are:
In scr_glm at 550
In scr_cfg_run_glm_scr at 125
In matlabbatch/private/cfg_run_cm at 29
In cfg_util>local_runcj at 1576
In cfg_util at 860
In cfg_ui>MenuFileRun_Callback at 1188
In gui_mainfcn at 95
In cfg_ui at 53
NaN"
Maybe that helps already?
Thank you,
Natalie
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi Tobias,
Sorry I just saw this now, I didn't get your e-mail address but I found a solution in the meanwhile :)
Thank you anyway and best regards,
Natalie
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi Dr Bach-
I am trying to analyze Galvanic Skin response data (collected from Biopac) using SCRalyze. The problem is for our task we have multiple sessions (3 to be exact). I want to calculate beta values for each conditions but I could not figure out the way analyze for multi session task. Should I have to concatenate multiple runs and then do the analysis OR, there is something already available in the toolbox that I am completely ignoring?
Thanks for help!!!
-Sabin
Hi Sabin
glad to help. If you want parameter estimates ("beta values") for each condition, across multiple sessions, it is easiest to just enter multiple sessions into one GLM. You can specify several sessions in the batch editor, and you need to provide one onset file and one data file per session.
You could also specify conditions that only include the events in one out of the three sessions, thus generating session-specific parameter estimates. Note, in this case, you still need to define the same conditions for all sessions, but you leave the onsets empty for those conditions that relate to another session. That is, if you have two conditions A and B, you will define 6 condition names: A1, A2, A3, B1, B2, B3. For session A, you leave onsets for A2, A3, B2, B3 empty.
Let me know if you have further questions.
Best
Dominik
Hi Dr. Bach,
Thanks for the reply. Different question: I am having trouble understanding why the estimate values I get with option 'scrf', 'scrf1' and 'scrf2' are different. If, our task have four conditions say A B C D, option 'scrf' would give us estimates for conditions A,B,C,D and a constant term. For 'scrf1' option would give us estimates for conditions A+temopral derivatives (TD),B+TD,C+TD,D+TD and a constant term. And finally for 'scrf2'would give us estimates for conditions A+temopral derivatives (TD), +Dispersion derivative(DD), B+TD+DD,C+TD+DD,D+TD+DD and a constant term. I was assuming the estimate for condition should be same for all three options, but I get different estimates with three options. As an example when I use 'scrf' option I get
betas: 0.95, -1.56, 1.89, -0.06
when I use 'scrf1' option I get 0.97 15.9 -1.5 -5.06 1.89 13.9 -0.08 -0.79 -0.00089
when I use 'scrf2' option I get 1.53 15.3 -195.9 -1.4 -6.2 78.1 1.98 14.9 -27.4 -0.1 1.5 10.2 -0.08.
Thanks,
Sabin
Last edit: sabin 2015-04-06
Hi Sabin
if you had just one condition, then including derivatives should not change the parameter estimate of the first, "canonical" response function.
However, you have several conditions, and the derivatives of one condition will in general be slightly correlated with the canonical regressor of another condition.
PsPM has no way of explicitly removing linear dependence in the design matrix (it uses the matlab function "pinv"), unlike for example the software SPM. If they are very small, they will have only small impact on the parameter estimates.
You can check this using the "orthogonality plot" in the model review manager.
Hope this helps
Best wishes
Dominik
Hello,
I have a question regarding the session-specific parameter estimates. I created onset-files for each session, containing all conditions (24 names). "Onsets" also consists of 24 cells but I only filled the onset-vectors for one session in each file and left the others empty [], as it was suggested.
When I try to create a GLM using 4 data-files and 4 onset-files (I have 4 session), the following error appears:
"Getting data...
Warning: Multiple condition information invalid: Condition "conditionname" - onsets{2} must be a numeric vector. (onsets{2} is the first position of an empty field [])
How did you avoid this issue with empty onset fields?
Many thanks,
Natalie
Hi Natalie
please bear with me while I'm chasing this one up - seems we have encountered something similar recently and not sure how it was fixed.
Best wishes
Dominik
Thank you, Dominik! It would be great to get a solution.
Best,
Natalie
Hi Natalie
I think I found the problem and uploaded some small changes into the svn repository. Could you please update your PsPM version to the latest version in the svn repository and check if the problem still occurs? If you do not use svn you can download the latest snapshot here: https://sourceforge.net/p/pspm/svn/HEAD/tarball?path=/trunk
best regards
Tobias
... if the problem still occurs, could you please provide me some sample data (at least the PsPM batch file)
best regards
Tobias
Hi Tobias,
great, thank you! I can only try it on Monday but then I will let you know if it works.
Best regards,
Natalie
Dear Tobias,
Setting up the GLM worked now without any error. However, it does not look completely correct. It seems to take into account only the data from the files defined as the first session, as seen in the design matrix (attached).
I also attached the batch that I used for setting up the GLM for one participant.
Do you have an idea where the problem is?
Please let me know if you need anything else.
Many thanks,
Natalie
Last edit: Natalie 2015-05-04
Hi Natalie
I would like to try this out by myself. Could you please provide me the other files which are referred in the provided batch setup, so I can setup the GLM file by myself? It is also okay for me to have a simplified version with about 2 to 4 sessions - as long as I am able to reproduce the mentioned behaviour.
Best regards
Tobias
Hi Tobias,
I have sent you a message about the files. But I realized, when setting up the GLM, there is still one more Warning:
"Orthogonalisation error in event type #02 (#03,....)
Correlation coefficients are:
Maybe that helps already?
Thank you,
Natalie
Hi Natalie,
did you receive my mail address? Shall I resend it to you?
Unfortunately I'm unable to tell you something about the error by looking at the lines from above.
Best regards
Tobias
Hi Tobias,
Sorry I just saw this now, I didn't get your e-mail address but I found a solution in the meanwhile :)
Thank you anyway and best regards,
Natalie