You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
ENH: inter_rater.fleiss_kappa p-values and confidence interval #9207
I needed this today as well coincidentally, so coded something up based on Fleiss, Nee, and Landis (1979) "Large sample variance of kappa in the case of different set of raters." Equation 3 in this paper (which says don't do it). This is what stata uses. If the number of raters is not the same for each subject, they don't produce anything for inference.
deffleiss_standard_error(table):
n, k=table.shape# n_subjects, n_choicesm=table.sum(axis=1)[0] # assume they all have the same ratings countp_bar=table.sum(axis=0) / (n*m)
q_bar=1-p_barreturn (
(2**.5/ (p_bar.dot(q_bar) *np.sqrt(n*m* (m-1))))
* (
(p_bar.dot(q_bar) **2) -np.sum(p_bar*q_bar* (q_bar-p_bar))
) **.5
)
Activity
jseabold commentedon May 8, 2024
I needed this today as well coincidentally, so coded something up based on Fleiss, Nee, and Landis (1979) "Large sample variance of kappa in the case of different set of raters." Equation 3 in this paper (which says don't do it). This is what stata uses. If the number of raters is not the same for each subject, they don't produce anything for inference.
ENH: Test stat for Fleiss Kappa