function results = testsofuniformityInvNorm(pdens)
% conducs the Berkowitz (2001) and Doornik and Hansen (2008) specification
% tests
% INPUTS: pdens - PITS
% OUTPUT: results, which includes the p-values for various versions of
% Berkowitz(2001) tests, i.e. for the nulls of normality, autocorrelation,
% as well as the joint test, as well as the p-value associated with Doornik
% and Hansen (2009) test
for i = 1:size(pdens,1)
    pit = cleanNaN(pdens(i,:));
    [lmeanvarPvalue(i,1) lindPvalue(i,1) lbothPvalue(i,1)] = berkowitz(pit);
    [DH_stats(i,1) DH_pvalue(i,1)] = DoornikHansen(pit);
end

results.lmeanvarPvalue = lmeanvarPvalue;
results.lindPvalue = lindPvalue;
results.lbothPvalue = lbothPvalue;
results.dhPvalue = DH_pvalue;