*! version 1.1.0 25Aug2023

Title

bhapkar -- Bhapkar's test of marginal homogeneity between two raters for categorical observations

Syntax

Using data stored in memory

bhapkar rater1 rater2 [if] [in]

Immediate form of bhapkar referring to a saved symmetrical matrix

bhapkari matname

by is allowed with bhapkar; see [D] by.

Description

bhapkar computes Bhapkar's chi-squared statistic to assess the marginal homogeneity (agreement) between two raters on categorical data
(Bhapkar 1966). If the associated p-value is significant (e.g. < 0.05), the hypothesis of equal marginal distributions is rejected.
That is, we do not accept the assumption that there is agreement between the two raters. Conversely, a non-significant
p-value can be interpreted as the two raters having equal marginal distributions (i.e. there is interrater agreement).

Examples

Setup for categorical level data

. vision.dta

These data are ratings of unaided distance vision between left and right eye of 7477 female employees in Royal Ordnance factories between 1943 and 1946.

. bhapkar reye leye

Referring to a matrix using bhapkari

. matrix input eye = (1520, 266, 124, 66 \ 234, 1512, 432, 78 \ 117, 362, 1772, 205 \ 36, 82, 179, 492)

. bhapkari eye

Stored results

bhapkar and bhapkari store the following in r():

Scalars

r(chisq) the chi-squared statistic

r(pval) the p-value of the chi-squared statistic (subjects)

r(nrat) the number of unique raters

r(ntar) the number of targets (observations)

r(df) the degrees of freedom

References

Bhapkar, V.P. 1966. A note on the equivalence of two test criteria for hypotheses in categorical data.
Journal of the American Statistical Association 61: 228-235.

Citation of iota

bhapkar is not an official Stata command. It is a free contribution
to the research community, like a paper. Please cite it as such:

Linden A. (2023). BHAPKAR: Stata module to compute Bhapkar's test of marginal homogeneity between two raters for categorical observations.

Authors

Ariel Linden

President, Linden Consulting Group, LLC

alinden@lindenconsulting.org

Also see

Online: symmetry, kappaetc (if installed), finn (if installed), iota (if installed), maxwell (if installed)