%% Adjust Significance Level for Multiple Tests
% The false discovery rate increases with the number of simultaneous hypothesis tests you conduct. To combat the increase, decrease the level of significance per test by using the 'Alpha' name-value pair argument. Consider the 3-D VAR(3) model and leave-one-out Granger causality test in docid:econ_ug#mw_ef939d73-b815-439a-a3d4-b7000807a69a.
% Load the US macroeconomic data set Data_USEconModel.mat.  Preprocess the data. Fit a VAR(3) model to the preprocessed data.

load Data_USEconModel

m1slrate = price2ret(DataTable.M1SL);
inflation = price2ret(DataTable.CPIAUCSL);
rgdprate = price2ret(DataTable.GDP./DataTable.GDPDEF);
tbl = table(m1slrate,inflation,rgdprate);
tbl = rmmissing(tbl);

Mdl = varm(3,3);
Mdl.SeriesNames = tbl.Properties.VariableNames;
EstMdl = estimate(Mdl,tbl{5:end,:},'Y0',tbl{2:4,:});

%
% A leave-one-out Granger causality test on the variables in the model results in numtests = 6 simultaneous tests.  Conduct the tests, but specify a family-wise significance level of 0.05 by specifying a level of significance of alpha = 0.05/numtests for each test.

numtests = 6;
alpha = 0.05/numtests
gctest(EstMdl,'Alpha',alpha);

% The test decisions of these more conservative tests are the same as the tests decisions in docid:econ_ug#mw_ef939d73-b815-439a-a3d4-b7000807a69a. However, the conclusions of the conservative tests hold simultaneously at a 5% level of significance.
% Copyright 2018 The MathWorks, Inc.