
% assume "data" [N, 2] stores 2 variables with N data points each.column 1 - insitu data, and column 2 - model data.

% the following will give values of all statistics ( stored in stats) and the statistics metrics names (stored in stats_tags) of the 2 variables based on the samples. See subroutine for input option details.
[stats, stats_tags] = get_validation_stats(...
                    data, 1, 'complete', 1, [1:2], Nmin, 1 );

% extract the confidence intervals (upper and lower) for Bias
BiasLO = -stats(strcmp(stats_tags,'CI_bias')) ;
BiasUP =  stats(strcmp(stats_tags,'CI_bias')) ;


% extract the  confidence intervals (ubRMSELO and ubRMSEUP) for ubRMSE, the above subroutine only estimates ubMSE, thus need some computation. 

ubRMSE =   sqrt(stats(strcmp(stats_tags,'MSE')) - stats(strcmp(stats_tags,'bias')).^2);
ubRMSELO = sqrt(stats(strcmp(stats_tags,'ubMSELO'))) -ubRMSE;
ubRMSEUP = sqrt(stats(strcmp(stats_tags,'ubMSEUP'))) -ubRMSE;
