fix argument checking in pooled_ols

time-shift
Houtan Bastani 2019-03-01 12:35:59 +01:00
parent cdadab34b4
commit f443037ed3
No known key found for this signature in database
GPG Key ID: 000094FB955BE169
1 changed files with 6 additions and 10 deletions

View File

@ -45,20 +45,16 @@ if isempty(ds) || ~isdseries(ds)
error('The first argument must be a dseries');
end
if isempty(param_common) && isempty(param_regex)
disp('Performing OLS instead of Pooled OLS...')
if nargin < 6
dyn_ols(ds);
else
dyn_ols(ds, {}, eqtags);
end
return
end
if nargin < 5
eqtags = {};
end
if isempty(param_common) && isempty(param_regex)
disp('Performing OLS instead of Pooled OLS...')
dyn_ols(ds, {}, eqtags);
return
end
assert(~isempty(param_common) && iscellstr(param_common), 'The second argument must be a cellstr');
assert(~isempty(param_regex) && iscellstr(param_regex), 'The third argument must be a cellstr');