Skip to content

Physiology regression GLM fnirs course bug #3

@andycasey

Description

@andycasey

In PhysiologyRegression_GLM_fnirs_course.m there seems to be a bug in that the comments indicate the maximum allowed shift for additional regressors is 20 seconds, but the code allows for the maximum shift to be 20 samples, where a sample is taken every 3.9 seconds. So the existing code allows for additional regressors to be up to ~80 seconds lagged.

From PhysiologyRegression_GLM_fnirs_course.m:

        if ~isempty(AdditionalRegressors)
            
            % Perform shift in each additional regressor
            % that maximizes the correlation with the fNIRS channel.
            % The maximum allowed shift is 20 seconds.
            
            maxLag = round(20*SD.f);

Here SD.f is the sample frequency (in Hz), which for the example data set is 3.9 Hz.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions