Single-trial GLM for trace fear conditioning - all parameters zero #886
Unanswered
valentina-jelincic
asked this question in
Q&A
Replies: 2 comments 2 replies
-
|
Thanks for reaching out. Which PsPM version are you using? Could you send us a sample GLM file to check what's happening? Dominik |
Beta Was this translation helpful? Give feedback.
0 replies
-
|
Hi Dominik,
Thank you for the quick reply!
I am sorry, I should have specified, I am using PsPM v. 7.0.
I am attaching the GLM batch file. I tried to attach one of the condition files, but I am not allowed to send .mat files. Let me know if you want me to share more files, e.g. via FileSender.
Valentina
…________________________________
From: Dominik Bach ***@***.***>
Sent: Wednesday, February 11, 2026 14:56
To: bachlab/PsPM ***@***.***>
Cc: Valentina Jelinčić ***@***.***>; Author ***@***.***>
Subject: Re: [bachlab/PsPM] Single-trial GLM for trace fear conditioning - all parameters zero (Discussion #886)
Thanks for reaching out.
Which PsPM version are you using?
Could you send us a sample GLM file to check what's happening?
Dominik
—
Reply to this email directly, view it on GitHub<#886 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AY4KAPNQA46MN3EPXPDXRS34LMYHPAVCNFSM6AAAAACUXUJH5SVHI2DSMVQWIX3LMV43URDJONRXK43TNFXW4Q3PNVWWK3TUHMYTKNZWHE4DGMI>.
You are receiving this because you authored the thread.Message ID: ***@***.***>
[ { ***@***.***": "http://schema.org", ***@***.***": "EmailMessage", "potentialAction": { ***@***.***": "ViewAction", "target": "#886 (comment)", "url": "#886 (comment)", "name": "View Discussion" }, "description": "View this Discussion on GitHub", "publisher": { ***@***.***": "Organization", "name": "GitHub", "url": "https://github.com" } } ]
%-----------------------------------------------------------------------
% pspm PsPM - Unknown
% cfg_basicio BasicIO - Unknown
%-----------------------------------------------------------------------
matlabbatch{1}.pspm{1}.prep{1}.import.datatype.acq_bioread.datafile = {'E:\FeaRES\Physiology analysis\code_feares\S1_1\scr\pspm_data\019902_FA.mat'};
matlabbatch{1}.pspm{1}.prep{1}.import.datatype.acq_bioread.importtype{1}.scr.chan_nr.chan_nr_spec = 2;
matlabbatch{1}.pspm{1}.prep{1}.import.datatype.acq_bioread.importtype{1}.scr.scr_transfer.none = true;
matlabbatch{1}.pspm{1}.prep{1}.import.overwrite = 1;
matlabbatch{2}.pspm{1}.first_level{1}.scr{1}.glm_scr.output.file = 'GLM_trialwise_scr_019902';
matlabbatch{2}.pspm{1}.first_level{1}.scr{1}.glm_scr.output.dir = {'E:\FeaRES\Physiology analysis\code_feares\S1_1\scr\pspm_glm_outputs'};
matlabbatch{2}.pspm{1}.first_level{1}.scr{1}.glm_scr.output.overwrite = 1;
matlabbatch{2}.pspm{1}.first_level{1}.scr{1}.glm_scr.chan.chan_def = 0;
matlabbatch{2}.pspm{1}.first_level{1}.scr{1}.glm_scr.timeunits.seconds = 'seconds';
matlabbatch{2}.pspm{1}.first_level{1}.scr{1}.glm_scr.session.datafile(1) = cfg_dep('Import: Output File', substruct('.','val', '{}',{1}, '.','val', '{}',{1}, '.','val', '{}',{1}), substruct('()',{':'}));
matlabbatch{2}.pspm{1}.first_level{1}.scr{1}.glm_scr.session.missing.no_epochs = 0;
matlabbatch{2}.pspm{1}.first_level{1}.scr{1}.glm_scr.session.data_design.condfile = {'E:\FeaRES\Physiology analysis\code_feares\S1_1\scr\pspm_data\019902_FA_GLM_trial_file.mat'};
matlabbatch{2}.pspm{1}.first_level{1}.scr{1}.glm_scr.session.nuisancefile = {''};
matlabbatch{2}.pspm{1}.first_level{1}.scr{1}.glm_scr.latency.fixed = 'fixed';
matlabbatch{2}.pspm{1}.first_level{1}.scr{1}.glm_scr.bf.scrf1 = 1;
matlabbatch{2}.pspm{1}.first_level{1}.scr{1}.glm_scr.norm = 1;
matlabbatch{2}.pspm{1}.first_level{1}.scr{1}.glm_scr.filter.edit.lowpass.disable = 0;
matlabbatch{2}.pspm{1}.first_level{1}.scr{1}.glm_scr.filter.edit.highpass.disable = 0;
matlabbatch{2}.pspm{1}.first_level{1}.scr{1}.glm_scr.filter.edit.down = 10;
matlabbatch{2}.pspm{1}.first_level{1}.scr{1}.glm_scr.filter.edit.direction = 'uni';
matlabbatch{2}.pspm{1}.first_level{1}.scr{1}.glm_scr.exclude_missing.excl_no = 'No';
matlabbatch{3}.pspm{1}.first_level{1}.export.datafile(1) = cfg_dep('GLM for SCR: Output File', substruct('.','val', '{}',{2}, '.','val', '{}',{1}, '.','val', '{}',{1}, '.','val', '{}',{1}), substruct('()',{':'}));
matlabbatch{3}.pspm{1}.first_level{1}.export.datatype = 'cond';
matlabbatch{3}.pspm{1}.first_level{1}.export.exclude_missing = false;
matlabbatch{3}.pspm{1}.first_level{1}.export.target.output.file = 'estimated_SCR_trials_019902';
matlabbatch{3}.pspm{1}.first_level{1}.export.target.output.dir = {'E:\FeaRES\Physiology analysis\code_feares\S1_1\scr\pspm_glm_outputs'};
matlabbatch{3}.pspm{1}.first_level{1}.export.target.output.overwrite = 1;
matlabbatch{3}.pspm{1}.first_level{1}.export.delim.tab = '\t';
|
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Dear Bachlab, PsPM users,
I am analyzing data from a trace fear conditioning experiment (very short CS of 100ms, followed by trace interval of 6s, expectancy rating, and the US (omission). The effective CS-US interval is ~10s on most trials. I am trying to extract SCR in the interval between the CS and the expectancy rating (trace interval).
Basic paradigm: differential fear conditioning (two different CS+, two different CS-, electric US)
Trial flow: Fixation cross for 5-7s --> CS for 100ms --> fixation cross for 6s --> expectancy rating until answer --> fixation cross for 1s --> US (omission) --> fixation dot for 2s
Based on the specifics of my paradigm (short CS, long CS-US interval), I chose to model the SCR using GLM. Because I would like to use mixed effects models, I need trialwise estimates. Using this paper by Kuhn, Gerlicher and Lonsdorf as reference, I created a condition file where each CS onset, each expectancy rating onset, and each US onset are included as separate conditions. I ran the batch and exported all parameters.
Now, I am facing two problems:
Error using [regexpi](matlab:matlab.lang.internal.introspective.errorDocCallback('regexpi')) All cells must be char row vectors.To be sure, I repeated this with 3 participants, and get the same zero estimates each time, even though the condition-wise GLM works. I am using the same condition file for both GLMs, just slightly tweaked to separate all the onsets in their own cells, so it is not a timing error.
Am I missing something about how the trialwise GLM should be set up? I am using all the default GLM settings. Thank you in advance for any clarity you can provide!
Kind regards,
Valentina
Beta Was this translation helpful? Give feedback.
All reactions