SQL Server Fleiss's Kappa function

KAPPA_FLEISS_TV

Updated: 24 May 2013

Use the table-valued function KAPPA_FLEISS_TV to calculate Fleiss’ kappa (Κ) as an index of inter-rater agreement between m raters on categorical data. KAPPA_FLEISS_TV also calculates the category-wise kappa and the corresponding test statistics. The equation for Fleiss’ kappa is

See the example below for an explanation of how Pi and Pj are calculated.

Syntax

SELECT*FROM [wctStatistics].[wct].[KAPPA_FLEISS_TV](

<@InputData_RangeQuery,nvarchar(max),>)

Arguments

@InputData_RangeQuery

a T-SQL statement, as a string, that specifies the subject, rater, and rating values.

Return Type

RETURNSTABLE(

[Rating] [sql_variant] NULL,

[Z] [float] NULL,

[K] [float] NULL,

[P] [float] NULL,

[SE] [float] NULL

)

Column

Column Description

Z

the test statistic

K

the kappa value

P

the p-value

SE

the standard error

Remarks

·The function is insensitive to order; it does not matter what order the ratings are passed in.

·Subjects, raters, ratings are automatically combined by the function.