Skip to content

Commit

Permalink
ICC functions now remove missing values
Browse files Browse the repository at this point in the history
  • Loading branch information
jmgirard committed Oct 3, 2015
1 parent f3fc2be commit 1218a81
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 4 deletions.
5 changes: 4 additions & 1 deletion ICC_A_1.m
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
% Calculate the single rater agreement intraclass correlation coefficient
% [ICC,LB,UB] = ICC_A_1(DATA)
%
% DATA is a numerical matrix of ratings with no missing values.
% DATA is a numerical matrix of ratings (missing values = NaN).
% Each row is a single item and each column is a single rater.
%
% ALPHA is the Type I error rate for the confidence interval (optional).
Expand All @@ -18,6 +18,9 @@
% Forming inferences about some intraclass correlation coefficients.
% Psychological Methods, 1(1), 30–46.

%% Remove any missing values
[rowindex,~] = find(~isfinite(DATA));
DATA(rowindex,:) = [];
%% Calculate descriptive statistics
[n,k] = size(DATA);
y = mean(DATA(:));
Expand Down
5 changes: 4 additions & 1 deletion ICC_A_k.m
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
% Calculate the average rater agreement intraclass correlation coefficient
% [ICC,LB,UB] = ICC_A_k(DATA)
%
% DATA is a numerical matrix of ratings with no missing values.
% DATA is a numerical matrix of ratings (missing values = NaN).
% Each row is a single item and each column is a single rater.
%
% ALPHA is the Type I error rate for the confidence interval (optional).
Expand All @@ -18,6 +18,9 @@
% Forming inferences about some intraclass correlation coefficients.
% Psychological Methods, 1(1), 30–46.

%% Remove any missing values
[rowindex,~] = find(~isfinite(DATA));
DATA(rowindex,:) = [];
%% Calculate descriptive statistics
[n,k] = size(DATA);
y = mean(DATA(:));
Expand Down
5 changes: 4 additions & 1 deletion ICC_C_1.m
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
% Calculate the single rater consistency intraclass correlation coefficient
% [ICC,LB,UB] = ICC_C_1(DATA)
%
% DATA is a numerical matrix of ratings with no missing values.
% DATA is a numerical matrix of ratings (missing values = NaN).
% Each row is a single item and each column is a single rater.
%
% ALPHA is the Type I error rate for the confidence interval (optional).
Expand All @@ -18,6 +18,9 @@
% Forming inferences about some intraclass correlation coefficients.
% Psychological Methods, 1(1), 30–46.

%% Remove any missing values
[rowindex,~] = find(~isfinite(DATA));
DATA(rowindex,:) = [];
%% Calculate descriptive statistics
[n,k] = size(DATA);
y = mean(DATA(:));
Expand Down
5 changes: 4 additions & 1 deletion ICC_C_k.m
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
% Calculate the average rater consistency intraclass correlation coefficient
% [ICC,LB,UB] = ICC_C_k(DATA)
%
% DATA is a numerical matrix of ratings with no missing values.
% DATA is a numerical matrix of ratings (missing values = NaN).
% Each row is a single item and each column is a single rater.
%
% ALPHA is the Type I error rate for the confidence interval (optional).
Expand All @@ -18,6 +18,9 @@
% Forming inferences about some intraclass correlation coefficients.
% Psychological Methods, 1(1), 30–46.

%% Remove any missing values
[rowindex,~] = find(~isfinite(DATA));
DATA(rowindex,:) = [];
%% Calculate descriptive statistics
[n,k] = size(DATA);
y = mean(DATA(:));
Expand Down

0 comments on commit 1218a81

Please sign in to comment.