Back to the main page.
Bug 530 - check description of design matrix conditional on required statfun
Status | CLOSED FIXED |
Reported | 2011-03-15 10:41:00 +0100 |
Modified | 2011-06-17 22:56:01 +0200 |
Product: | FieldTrip |
Component: | core |
Version: | unspecified |
Hardware: | PC |
Operating System: | Mac OS |
Importance: | P1 enhancement |
Assigned to: | Johanna |
URL: | |
Tags: | |
Depends on: | |
Blocks: | |
See also: |
Jan-Mathijs Schoffelen - 2011-03-15 10:41:03 +0100
This is inspired by a recent issue, in which a user specified cfg.uvar in combination with cfg.statistic = 'indepsamplesF', leading to bogus results. Probably, this is caused by the randomization scheme taking the uvar into account (once it is defined). We may consider explicitly checking the design matrix conditional on the requested statistic (for known statfun). In that case, if cfg.statistic = 'indepsamplesXXX', an accidentally defined cfg.uvar should be deleted from the design matrix before the call to the randomization function
Robert Oostenveld - 2011-03-15 14:02:18 +0100
This requires knowledge about the statistic, which is only present in the statfun. So what I suggest is to have the check in the respective statfuns: statfun_indepsamplesX if isfield(cfg, 'uvar') && ~isempty(cfg.uvar) error end statfun_depsamplesX if ~isfield(cfg, 'uvar') || isempty(cfg.uvar) error end