From ca04b8f30fe9a17318b0c868a76c25bce648c6f2 Mon Sep 17 00:00:00 2001 From: jmgirard Date: Mon, 14 May 2018 19:44:03 +0800 Subject: [PATCH] Remove printing to permit bootci --- mAGREE.m | 8 +++----- mALPHAK.m | 4 ---- mGAMMA.m | 4 ---- mKAPPA.m | 8 ++------ mSCOTTPI.m | 4 ---- mSSCORE.m | 4 ---- 6 files changed, 5 insertions(+), 27 deletions(-) diff --git a/mAGREE.m b/mAGREE.m index 868c1d0..c2b0805 100644 --- a/mAGREE.m +++ b/mAGREE.m @@ -45,17 +45,17 @@ %% Check for valid data from multiple raters if n < 1 P_O = NaN; - fprintf('ERROR: At least 1 valid item is required. \n') + disp('ERROR: At least 1 valid item is required.'); return; end if r < 2 P_O = NaN; - fprintf('ERROR: At least 2 raters are required. \n'); + disp('ERROR: At least 2 raters are required.'); return; end if any(ismember(x, CATEGORIES) == 0) P_O = NaN; - fprintf('ERROR: Unexpected category in CODES. \n'); + disp('ERROR: Unexpected category in CODES.'); return; end %% Get weights from mWEIGHTING function @@ -73,7 +73,5 @@ nprime = sum(r_i >= 2); possible = r_i .* (r_i - 1); P_O = sum(observed(r_i >= 2) ./ (possible(r_i >= 2))) ./ nprime; -%% Output reliability and variance components -fprintf('Percent observed agreement = %.3f \n', P_O); end \ No newline at end of file diff --git a/mALPHAK.m b/mALPHAK.m index 66cb241..a2e4128 100644 --- a/mALPHAK.m +++ b/mALPHAK.m @@ -87,9 +87,5 @@ P_C = sum(sum(weights .* (pihat * transpose(pihat)))); %% Calculate reliability point estimate ALPHAK = (P_O - P_C) / (1 - P_C); -%% Output reliability and variance components -fprintf('Percent observed agreement = %.3f \n',P_O); -fprintf('Percent chance agreement = %.3f \n\n',P_C); -fprintf('Krippendorff''s alpha coefficient = %.3f \n', ALPHAK); end \ No newline at end of file diff --git a/mGAMMA.m b/mGAMMA.m index d6f0d8a..8fce9d7 100644 --- a/mGAMMA.m +++ b/mGAMMA.m @@ -82,9 +82,5 @@ P_C = sum(weights(:)) .* sum(pihat .* (1 - pihat)) ./ (q * (q - 1)); %% Calculate reliability point estimate GAMMA = (P_O - P_C) / (1 - P_C); -%% Output reliability and variance components -fprintf('Percent observed agreement = %.3f \n', P_O); -fprintf('Percent chance agreement = %.3f \n\n', P_C); -fprintf('Gwet''s gamma coefficient = %.3f \n', GAMMA); end \ No newline at end of file diff --git a/mKAPPA.m b/mKAPPA.m index a70cbea..f09e0f4 100644 --- a/mKAPPA.m +++ b/mKAPPA.m @@ -37,9 +37,9 @@ x(~isfinite(x)) = []; if nargin < 2 CATEGORIES = x; - WEIGHTING = 'nominal'; + WEIGHTING = 'identity'; elseif nargin < 3 - WEIGHTING = 'nominal'; + WEIGHTING = 'identity'; end if isempty(CATEGORIES) CATEGORIES = x; @@ -91,9 +91,5 @@ P_C = sum(sum(weights .* (pbar_k * transpose(pbar_k) - ssq_kl ./ r))); %% Calculate reliability point estimate KAPPA = (P_O - P_C) / (1 - P_C); -%% Output reliability and variance components -fprintf('Percent observed agreement = %.3f \n', P_O); -fprintf('Percent chance agreement = %.3f \n\n', P_C); -fprintf('Cohen''s kappa coefficient = %.3f \n', KAPPA); end \ No newline at end of file diff --git a/mSCOTTPI.m b/mSCOTTPI.m index 059447b..8c82d54 100644 --- a/mSCOTTPI.m +++ b/mSCOTTPI.m @@ -83,9 +83,5 @@ P_C = sum(sum(weights .* (pihat * transpose(pihat)))); %% Calculate reliability point estimate SCOTTPI = (P_O - P_C) / (1 - P_C); -%% Output reliability and variance components -fprintf('Percent observed agreement = %.3f \n', P_O); -fprintf('Percent chance agreement = %.3f \n\n', P_C); -fprintf('Scott''s pi coefficient = %.3f \n', SCOTTPI); end \ No newline at end of file diff --git a/mSSCORE.m b/mSSCORE.m index ad86bf0..bf3406a 100644 --- a/mSSCORE.m +++ b/mSSCORE.m @@ -84,9 +84,5 @@ P_C = sum(weights(:)) / (q ^ 2); %% Calculate reliability point estimate SSCORE = (P_O - P_C) / (1 - P_C); -%% Output reliability and variance components -fprintf('Percent observed agreement = %.3f \n', P_O); -fprintf('Percent chance agreement = %.3f \n\n', P_C); -fprintf('Bennett et al.''s S score = %.3f \n', SSCORE); end \ No newline at end of file