I am analysing the skin conductance response of an experiment with 3 sessions of roughly 700 seconds. The onsets of events are given in seconds in onset files (one for each session).
When I run the GLM, I get a design matrix that looks like all events are happening in the first 700 ms. It seems like PsPM concatenates all data but interprets the onset times from sessions 2 and 3 as onsets from the start of session 1. Is there a solution to this, other than adding the durations of sessions 1 and 2 to the onsets in my onset files?
With very best wishes,
Jesse
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
thanks for the enquiry. This should definitively not happen, and we will chase this up. Would it be possible for you to send us a screenshot of the design matrix, a sample onset file, and if you're scripting, a sample script file?
Thank you
Dominik
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I think this is a problem in the code of scr_glm.m. To solve the problem I recommend you to do the changes on your own (because there have been a lot changes to this file lately). You can do this by going through the following steps:
find the scr_glm.m file in your PsPM folder
open the file and search the line which looks like this: "snonsets = [1, snoffsets(2:end) + 1];"
replace the line with "snonsets = [1, snoffsets(1:end) + 1];"
save and close the file, re-run the glm and then open the design matrix and check if it worked or not
Thank you for your comments and my apologies for my tardy reply. I've left this project for a while but am now getting back to it.
I have tried both solutions (to change te code and to update PsPM), but my design matrix still has this strange shape. I just took a look in the glm.m file, and I see that my initial hypothesis, that PsPM concatenates all data but interprets the onset times from sessions 2 and 3 as onsets from the start of session 1, was not true. The onset times in glm.timing.onsets{1,1} seem to be correct (although they are in units of deciseconds instead of seconds as in my conditions file). There must thus be something else that I did wrong, but I still do not understand what.
Could you perhaps have a look at my glm file and condition files and tell me what I do wrong?
Dear Dominik,
I am analysing the skin conductance response of an experiment with 3 sessions of roughly 700 seconds. The onsets of events are given in seconds in onset files (one for each session).
When I run the GLM, I get a design matrix that looks like all events are happening in the first 700 ms. It seems like PsPM concatenates all data but interprets the onset times from sessions 2 and 3 as onsets from the start of session 1. Is there a solution to this, other than adding the durations of sessions 1 and 2 to the onsets in my onset files?
With very best wishes,
Jesse
Dear Jesse
thanks for the enquiry. This should definitively not happen, and we will chase this up. Would it be possible for you to send us a screenshot of the design matrix, a sample onset file, and if you're scripting, a sample script file?
Thank you
Dominik
Dear Dominik,
Thank you very much for your reply. I've attached here the files you've requested. Please let me know if you need any more information.
Best,
Jesse
Last edit: Jesse Geerts 2015-11-23
Hi Jesse
I think this is a problem in the code of scr_glm.m. To solve the problem I recommend you to do the changes on your own (because there have been a lot changes to this file lately). You can do this by going through the following steps:
If you prefer to replace the file you can download it from here: https://sourceforge.net/p/pspm/svn/196/tree//trunk/scr_glm.m?format=raw (this may cause problems if you're not working with the current version from the SVN)
best regards
Tobias
This bug has now been resolved in version PsPM 3.0.2
Dominik
Dear Dominik and Tobias,
Thank you for your comments and my apologies for my tardy reply. I've left this project for a while but am now getting back to it.
I have tried both solutions (to change te code and to update PsPM), but my design matrix still has this strange shape. I just took a look in the glm.m file, and I see that my initial hypothesis, that PsPM concatenates all data but interprets the onset times from sessions 2 and 3 as onsets from the start of session 1, was not true. The onset times in glm.timing.onsets{1,1} seem to be correct (although they are in units of deciseconds instead of seconds as in my conditions file). There must thus be something else that I did wrong, but I still do not understand what.
Could you perhaps have a look at my glm file and condition files and tell me what I do wrong?
With very best wishes and many thanks,
Jesse
Last edit: Jesse Geerts 2016-01-09
Dear Jesse
thanks for sharing your GLM file.
The event onsets in glm.timing.onsets are specified in samples at a sampling rate of 10 Hz, which explains your observations.
When I review the design matrix with my version of PsPM, it looks ok (see attachment).
In case you did not accidentally load (or send) the wrong file, perhaps you could give us a screenshot again of the design matrix that you find odd?
Thanks in advance
Best
Dominik
Last edit: Dominik Bach 2016-01-10
Dear Dominik,
I just retried and indeed I do get the same design matrix. I guess I must have loaded the wrong glm file initially.
Thank you very much and sorry for the confusion.
Best,
Jesse