Skip to content

Commit

Permalink
Remove printing to permit bootci
Browse files Browse the repository at this point in the history
  • Loading branch information
jmgirard committed May 14, 2018
1 parent 438a8a5 commit ca04b8f
Show file tree
Hide file tree
Showing 6 changed files with 5 additions and 27 deletions.
8 changes: 3 additions & 5 deletions mAGREE.m
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
4 changes: 0 additions & 4 deletions mALPHAK.m
Original file line number Diff line number Diff line change
Expand Up @@ -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
4 changes: 0 additions & 4 deletions mGAMMA.m
Original file line number Diff line number Diff line change
Expand Up @@ -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
8 changes: 2 additions & 6 deletions mKAPPA.m
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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
4 changes: 0 additions & 4 deletions mSCOTTPI.m
Original file line number Diff line number Diff line change
Expand Up @@ -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
4 changes: 0 additions & 4 deletions mSSCORE.m
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit ca04b8f

Please sign in to comment.