Menu

Problem in 1st level GLM beta values

Help
S.Wheelock
2014-06-10
2014-06-23
  • S.Wheelock

    S.Wheelock - 2014-06-10

    Dear Dr. Bach,

    I am a student at the University of Birmingham at Alabama. Our lab uses Biopac and AcqKnowledge 4.1.0 to record skin conductance during fMRI. Our task is a fast event-related design with 5 second stimulus presentations and a 1 to 3 second inter trial interval. We are very excited to use your SCRalyze software for the GLM analysis of the fast event-related SCR data.

    After running the 1st level GLM for an individual, we discovered that all of the betas for the trial type regressors were the same value (with the exception of the contrasts with more than one trial type specified i.e. Fullmodel [1 1 1 1 1]). We must have done something wrong. However, after re-reading the manual several times and double checking our steps we are still unsure of where our error occurred.

    I don't want to impose on you, but I would greatly appreciate it if you have time to download and look through our files. My hope is that you would be able to tell us where we went wrong.


    These are the steps we followed:

    We converted AcqKnowledge graph files (with 1 column for the SCR and 5 columns of stimulus type information) into tab delimited text format, and then into .mat files (Matlab R2010b) by using the SCRalyze GUI "Import".

    Column 1: scr
    Column number: 1
    Sample rate: 250
    Transfer function: None

    Column 2: Response
    Column number:2
    Sample rate: 250

    Column 3: Response
    Column number:3
    Sample rate: 250

    Column 4: Response
    Column number:4
    Sample rate: 250

    Column 5: Response
    Column number:5
    Sample rate: 250

    Column 6: Response
    Column number:6
    Sample rate: 250

    Link to an example starting text file:
    2WAVE_MIST1.txt
    Link to our import script file:
    importMISTtxtscr.m
    Link to an example generated scr_*.mat file:
    scr_2WAVE_MIST1.mat

    As far as we can tell, this worked as intended, creating scr_*.mat files in different folders, each containing a 6x1 data cell and a 1x1 infos structure.

    Our next step was to create condition files paired with each scr_*.mat file generated by the Import. Each condition file was an Onset_*.mat file containing a 1x5 names cell matrix and a 1x5 onsets cell matrix. Each cell in the onsets matrix contained a string of comma delineated values for one stimulus type.

    Link to the script we used to make the condition files:
    CreateMISTConditionFile.m
    Link to an example generated Onset_*.mat file:
    Onset_2WAVE_MIST1.mat

    We then used the SCRalyze GUI to run 1st level GLM. This created corresponding glm_*.mat files for each paired scr_*.mat and Onset_*.mat file.

    Link to GLM script:
    glm_forMISTscr.m
    Link to example generated glm_*.mat file:
    glm_2WAVE_MIST1.mat

    This is where we experienced the problem that the beta values in the GLM were the same for every stimulus type.


    Thank you for considering our question. We will be grateful for any advice you can provide.

    -S.Wheelock

     
  • Dominik Bach

    Dominik Bach - 2014-06-11

    Dear S Wheelock

    thank you for your excellently documented help request. The level of documentation made it easy to spot the problem, and that always saves time for me, so thanks.

    The problem is in the onset file which contains, for each condition, an onset string with loads of zeros separated by commas. Onsets should be a cell array of numerical vectors instead. We will modify the relevant input checks such that this will become rejected by the GLM function in the future.

    In the script that generates the onset files, you need to make sure that numerical values are entered into the onsets cell. Further, I noticed that you extract the marker onsets from the SCR file, but these channels are not labelled as marker channels but as continuous respiration channels. They do not contain time stamps but continuous values. Instead of entering the entire data into the onsets variable (which will then contain many zeros and ones), you should extract the actual markers, i. e. time points where the channel has value one. For example, by using

    onset = find(data{k}.data == 1);

    Hope this helps
    Best
    Dom

     
    • S.Wheelock

      S.Wheelock - 2014-06-20

      Dr. Bach,

      Thank you so much for your prompt response, it was very helpful to us.

      After reviewing your answer, we realized that our first problem was the way we used the scr_import function in our importMISTtxtscr.m script. We incorrectly imported the columns of stimulus markers as "resp" because we thought it meant 'Response'. We were unable to find documentation in the manual or the help file as to the meaning of the different .type import options. We fixed this by importing them as "trigger."

      After we corrected that, we also fixed our CreateMISTConditionFile.m. We had erroneously generated a comma separated string because, while we thought this was an odd data format, we couldn't think of any other way to format the data such that it would appear with commas as shown in the example on page 9 of the manual e.g. onsets = {[1,3,5],[2,4,7]}. This was a novice mistake on our part. If we had just typed help scr_glm, we would have seen that it does clearly state it should be formatted similar to SPM8 with numeric vectors e.g. onsets = {[1 2 3], [4 5 6]}.

      The last thing we had to correct was to change the timeunits in our glm_forMISTscr.m script from "samples" to "seconds".

      We now have everything working that we need to complete the analysis of our data, and we are very grateful for all of your help.

      Best wishes,
      S.Wheelock

       
  • Dominik Bach

    Dominik Bach - 2014-06-23

    Excellent - I'm glad I could help.

    Thanks also for the feedback regarding the help/manual. The next release will contain better explanations on these points.

    best
    Dom

     

Log in to post a comment.