Commit cf0595a4 authored by Meryem Ayse Yucel's avatar Meryem Ayse Yucel
Browse files

Update hmrR_GLM.m

Setting the t and pval of the pruned channels to 0 and NaN respectively.
parent bc72b9f3
Loading
Loading
Loading
Loading
+24 −12
Original line number Diff line number Diff line
@@ -805,6 +805,10 @@ for iBlk=1:length(data_y)
    if glmSolveMethod == 1 % for OLS
        % GLM stats for each condition
        if exist('tval')
            % set pruned channels tval to zero and pval to NaN
            tval(:,find(mlAct(1:size(ml,1))==0),:) = 0;
            pval(:,find(mlAct(1:size(ml,1))==0),:) = NaN;
            %
            hmrstats.beta_label = beta_label;
            hmrstats.tval = tval;
            hmrstats.pval = pval;
@@ -812,6 +816,10 @@ for iBlk=1:length(data_y)
        end
    else                   % for iWLS
        if exist('tstat')
            % set pruned channels tval to zero and pval to NaN
            tstat(:,find(mlAct(1:size(ml,1))==0),:) = 0;
            pval(:,find(mlAct(1:size(ml,1))==0),:) = NaN;
            %
            hmrstats.beta_label = beta_label;
            hmrstats.tval = tstat;
            hmrstats.pval = pval;
@@ -822,6 +830,10 @@ for iBlk=1:length(data_y)
    % GLM stats for contrast between conditions, if c_vector exists
    if (sum(abs(c_vector)) ~= 0) && (size(c_vector,2) == nCond) && nCond>1
        if exist('tval_contrast')
            % set pruned channels tval to zero and pval to NaN
            tval_contrast(:,find(mlAct(1:size(ml,1))==0),:) = 0;
            pval_contrast(:,find(mlAct(1:size(ml,1))==0),:) = NaN;
            %
            hmrstats.tval_contrast = tval_contrast;
            hmrstats.pval_contrast = pval_contrast;
            hmrstats.contrast = c_vector;