magree: O'Connell-Dobson-Schouten estimators for multiobserver...

Description Usage Arguments Details Value See Also Examples

View source: R/oconnell.R

Description

Use the O'Connell-Dobson-Schouten estimators of agreement for nominal or ordinal data.

Usage

1
magree(X, weights=c("unweighted","linear","quadratic"), score = NULL)

Arguments

X

A matrix or data-frame with observations/subjects as rows and raters as columns.

weights
"unweighted"

For nominal categories - only perfect agreement is counted.

"linear"

For ordinal categories where disagreement is proportional to the distance between the categories. This is analogous to the agreement weights w_{i,j}=1-|score[i]-score[j]|/(max(score)-min(score)).

"quadratic"

For ordinal categories where disagreement is proportional to the square of the distance between the categories. This is analogous to the agreement weights w_{i,j}=1-(score[i]-score[j])^2/(max(score)-min(score))^2.

score

The scores that are to be assigned to the categories. Currently, this defaults to a sorted list of the unique values.

Details

The Fortran code from Professor Dianne O'Connell was adapted for R.

The output object is very similar to the Fortan code. Not all of the variance terms are currently used in the print and summary methods.

Value

oconnell

object from the oconnell function

schouten

object from the schouten function

call

As per sys.call(), to allow for using update

See Also

oconnell, schouten.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
## Table 1 (O'Connell and Dobson, 1984)
summary(fit <- magree(landis, weights="unweighted"))
update(fit, weights="linear")
update(fit, weights="quadratic")

## Table 5, O'Connell and Dobson (1984)
magree(landis==1)
magree(landis==2)
magree(landis==3)
magree(landis==4)
magree(landis==5)

## Plot of the marginal distributions
plot(fit) 

## Plot of the average agreement by observer
plot(fit, type="kappa by observer") 

magree documentation built on Sept. 3, 2020, 9:07 a.m.