function [stat] = freqstatistics(cfg, varargin)

% FREQSTATISTICS computes probabilities for a given hypothesis
% using the general linear model or using a non-parametric randomization
% approach for the statistics.
%
% Use as
%   [stat] = freqstatistics(cfg, freq1, freq2, ...)
% where the input data is the result from FREQANALYSIS, FREQDESCRIPTIVES
% or from FREQGRANDAVERAGE.
%
% The configuration can contain the following options for data selection
%   cfg.channel            = cell-array of size Nx1, see CHANNELSELECTION
%   cfg.latency            = [begin end], can be 'all' (default)
%   cfg.frequency          = [begin end], can be 'all' (default)
%   cfg.avgoverchan        = 'yes' or 'no' (default)
%   cfg.avgovertime        = 'yes' or 'no' (default)
%   cfg.avgoverfreq        = 'yes' or 'no' (default)
%
% The configuration should contain the following options for the statistics
%   cfg.approach           = string, see below
%   cfg.method             = string, see below
%
% There are two options that you have to specify for the statistical test,
% the "approach" and the "method". The approach determines which statistical
% back-end is used, the method determines which specific statiistical test
% is performed. The statistical approach XXX is described in detail in
% the function STATISTICS_XXX. The only approach that is currently fully
% supported is STATS, which uses the Matlab Statistics toolbox. Other
% approaches will become available in the near future.
%
% The different methods (e.g. ttest, anova) that are available depend
% on the general approach. See the help of STATISTICS_XXX for more details,
% where XXX should be replaced by the approach that you want to take.
%
% See also FREQANALYSIS, FREQDESCRIPTIVES, FREQGRANDAVERAGE

% Copyright (C) 2005, Robert Oostenveld
%
% $Log: freqstatistics.m,v $
% Revision 1.3  2005/04/07 17:12:21  roboos
% improved the general help documentation, no code changes
%
% Revision 1.2  2005/04/06 14:29:41  roboos
% added copyrights and a log message placeholder
%

% call the general function
[stat] = statistics_wrapper(cfg, varargin{:});

