File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed
Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change 253253% is ideal for predictor variables that are either ordinal,
254254% or nominal with their levels ordered such that the contrast
255255% coding reflects tests of some hypotheses of interest about
256- % the nested grouping of the predictor levels.
256+ % the nested grouping of the predictor levels. Note that the
257+ % the one-level predictor is the reference and is subtracted
258+ % from from the mean of the subsequent predictor levels.
257259%
258260% o 'effect': Deviation effect coding. The intercept represents
259261% the grand mean. Each slope coefficient compares one level
18241826
18251827 % Create contrast matrix (of doubles) using Helmert coding contrasts
18261828 % These contrasts are orthogonal and centered (i.e. sum to 0)
1827- C = bsxfun (@rdivide , ...
1828- cat (1 , diag ((N - 1 ): -1 : 1 ) + tril (-ones (N - 1 ), - 1 ), ...
1829- - ones(1 , N - 1 )), N : -1 : 2 );
1829+ C = - bsxfun (@rdivide , ...
1830+ cat (1 , diag ((N - 1 ): -1 : 1 ) + tril (-ones (N - 1 ), - 1 ), ...
1831+ - ones(1 , N - 1 )), N : -1 : 2 );
18301832
18311833end
18321834
You can’t perform that action at this time.
0 commit comments