-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Parameter modulation only for several conditions, not all #191
Comments
Hi Maria |
Hi Dominik, Best |
Hi Maria as you say, you left pmod(k).param as an empty cell, but specified pmod(k).name. The right way to do is to leave pmod(k) empty altogether. |
Hi Dominik, I might have not explained well enough, why my condition file is looking this way, sorry. So this is what my condition files for one glm look like now, for one subject with four sessions, 9 conditions each. I also attached what the design matrix then looks like once I implemented the dummy pmods. So you can see what I am trying to do. Only the dummy pmod regressors look weird(all black). Thank you very much for your patience. Best |
Hi Maria I understand. Of course, your names and onsets definition is correct for the purpose then. And what I wrote previously about the durations is incorrect - they will be used, not ignored. (Although, non-zero durations are not recommended with the current models in PsPM). Regarding the pmods, the way it should work is that you specify all pmods that you want to use in any of the sessions (i.e. pmod(1)-pmod(6), pmod(10)-pmod(12), etc. The error seems to occur in the GLM function rather than in the function that processes the timings. To reproduce that, it would be preferable if you could also send a data file, and the code you use to call the function. As a quick fix, since you use different conditions for different sessions, there is no advantage in having them all in one model. So you could just use different GLMs for different sessions. You just need to be careful in case you are normalising the data - that should be done across sessions, rather than separately for each sessions. Hope this helps |
Hi Dominik, Yes that helps a lot, thank you! I will use the zero durations as you recommend from now on. I think your option for a quick fix is a good idea, although I am not sure how to normalize the data across sessions, when I am doing different GLMs for different sessions. Is there an option for that in the GUI or would I have to adjust the code? Attached you will find my glm_maria_job script that contains the batch with my specifications and calls pspm_glm.m. My loop looks a bit weird as I have subjects that miss some sessions, but if you use the 2 as suggested in the loop it should work. Also attached the data files and the condition files for subject 2 that has all 6 sessions. Also the ERROR message that occurred after using the not defined pmods was different after all: datafiles.zip Best |
Hi Maria I could reproduce your error, and it occurred when processing pmod(10) in session 2. I think the issue is that not all pmods that will later be used are defined in the first session. So, while you should not specify the pmods for the conditions that will never have a pmod in any session (e.g. 7-9), you need to specify pmod(10) in the first session already (with empty param). Does that work at all? Best |
Hi Dominik Thank you very much! It works indeed! It even works with files in which I don't specify the pmods for all sessions in the first session, but only have the information for the specific session stored at the respective position. But only when I put in empty cells pmod(10).param{1}= [] at the places where the pmods for the other sessions are supposed to go. I guess its just checking if there is the right format 'cell' for the pmod(10) in the first session and then gets the actual information of the condition file that is claimed for session 2? Ok that really helped a lot! Thanks again. I guess the reason why I thought the information only has to be stored for one sessions' pmod in each condition file was, that that's how it works for onsets and durations. Best |
Hi,
My name is Maria Huber and I am working on my medical thesis at the Neuropsychiatry and Neuroimaging Lab at the Technische Universität München.
Is it possible to do parameter modulation only for several and not for all conditions in a glm in pspm? I want to do parameter modulation on 6 of my 9 conditions in one session.
I specified all conditions of that session under 'names' in the condition file and added 'pmod' with the same number of elements as 'names'. However as I don't want to do parameter modulation on the last 3 conditions I inserted dummy files for pmod.param (containing ones) with the same number of elements as the respective event onsets. The resulting design matrix now has all black conditions for the 3 dummy modulated conditions. I am just wondering if I am overlooking something or if this is the only way to do it.
Thanks in advance!
Best,
Maria Huber
The text was updated successfully, but these errors were encountered: