Skip to content

Commit

Permalink
undo homogenous changes
Browse files Browse the repository at this point in the history
  • Loading branch information
arnodelorme committed Oct 10, 2022
1 parent 4c256d2 commit d68648b
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 15 deletions.
2 changes: 1 addition & 1 deletion functions/sigprocfunc/transformcoords.m
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@
% pitch roll yaw rotation
% -----------------------
% pitch (x-axis); roll = y axis rotation; yaw = z axis
% see http://bishopw.loni.ucla.edu/AIR5/homogeneous.html
% see http://bishopw.loni.ucla.edu/AIR5/homogenous.html
cp = cos(pitch); sp = sin(pitch);
cr = cos(roll); sr = sin(roll);
cy = cos(yaw); sy = sin(yaw);
Expand Down
6 changes: 3 additions & 3 deletions functions/statistics/statcond.m
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
% 'variance' = ['homegenous'|'inhomogenous'] this option is exclusively
% for parametric statistics using unpaired t-test. It allows
% to compute a more accurate value for the degree of freedom
% using the formula for inhomogeneous variance (see
% using the formula for inhomogenous variance (see
% ttest2_cell function). Default is 'inhomegenous'.
% 'surrog' = surrogate data array (see output).
% 'stats' = F- or T-value array (see output).
Expand Down Expand Up @@ -559,11 +559,11 @@

% compute t-test
% -------------------
function [t, df] = ttest_cell_select( res, paired, homogeneous)
function [t, df] = ttest_cell_select( res, paired, homogenous)
if strcmpi(paired,'on')
[t, df] = ttest_cell( res{1}, res{2});
else
[t, df] = ttest2_cell( res{1}, res{2}, homogeneous);
[t, df] = ttest2_cell( res{1}, res{2}, homogenous);
end

% function to compute the number of dimensions
Expand Down
20 changes: 10 additions & 10 deletions functions/statistics/ttest2_cell.m
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
% a,b = data consisting of UNPAIRED arrays to be compared. The last
% dimension of the data array is used to compute the t-test.
% 'inhomogenous' = use computation for the degree of freedom using
% inhomogeneous variance. By default the computation of
% the degree of freedom is done with homogeneous
% inhomogenous variance. By default the computation of
% the degree of freedom is done with homogenous
% variances.
%
% Outputs:
Expand All @@ -36,7 +36,7 @@
%
% Author: Arnaud Delorme, SCCN/INC/UCSD, La Jolla, 2005
% (thank you to G. Rousselet for providing the formula for
% inhomogeneous variances).
% inhomogenous variances).
%
% Reference:
% Schaum's outlines in statistics (3rd edition). 1999. Mc Graw-Hill.
Expand Down Expand Up @@ -76,19 +76,19 @@
return;
end

homogeneous = 'homogeneous';
homogenous = 'homogenous';
if nargin > 1 && ischar(b)
homogeneous = b;
homogenous = b;
end
if nargin > 2 && ischar(c)
homogeneous = c;
homogenous = c;
end
if iscell(a),
b = a{2};
a = a{1};
end
if ~strcmpi(homogeneous, 'inhomogenous') && ~strcmpi(homogeneous, 'homogeneous')
error('Value for homogeneous parameter can only be ''homogeneous'' or ''inhomogenous''');
if ~strcmpi(homogenous, 'inhomogenous') && ~strcmpi(homogenous, 'homogenous')
error('Value for homogenous parameter can only be ''homogenous'' or ''inhomogenous''');
end

nd = myndims(a);
Expand All @@ -97,8 +97,8 @@
meana = mymean(a, nd);
meanb = mymean(b, nd);

if strcmpi(homogeneous, 'inhomogenous')
% inhomogeneous variance from Howel, 2009, "Statistical Methods for Psychology"
if strcmpi(homogenous, 'inhomogenous')
% inhomogenous variance from Howel, 2009, "Statistical Methods for Psychology"
% thank you to G. Rousselet for providing these formulas
m = meana - meanb;
s1 = var(a,0,nd) ./ na;
Expand Down
2 changes: 1 addition & 1 deletion plugins/clean_rawdata
Submodule clean_rawdata updated 1 files
+14 −17 clean_artifacts.m

0 comments on commit d68648b

Please sign in to comment.