boschek.test: Boschek's test of reliability

View source: R/boschek.test.R

boschek.testR Documentation

Boschek's test of reliability

Description

Implementation of the Boschek's test of reliability as described in "Pape name".

Usage

boschek.test(data, Q, exact_prob = TRUE)

Arguments

data

A matrix or a dataframe containing observations. It can be either in long format - with columns corresponding to a raters and rows to subjects rated, or, in an aggregated manner, with one column labeled "frequency" containing counts of combinations of ratings which are specified in remaining columns.

Q

Classification matrix against which are the data tested.

exact_prob

Whether the exact probability estimates should be computed. Only possible when number of categories is 2.

References

Boschek, P., Vranka, M. A., Bartoš, F., Name of the Paper, 2019

Examples

### 2 raters, 2 categories and data in long format
# load data1
data(d1)

# create classification matrix
Q1 <- matrix(c(.9, .1,
               .1, .9),byrow = TRUE, nrow = 2, ncol = 2)
               
# fit the model
m1 <- boschek.test(data = d1,Q = Q1)

# quickly inspect the model
m1

# for more details use summary function
summary(m1)

# to print residuals and aggregated data matrix use residuals function
residuals(m1)

# in order to print all columns and rows set argument print.all = TRUE
residuals(m1, print.all = TRUE)

# or access the residuals directly from the fitted object
m1$model_A$table
m1$model_B$table

### ------------------------------------------------- ###
### 3 raters, 3 categories and data in long format
# load data1
data(d2)

# note that column containing the number of rattings is called frequency
head(d2)

# create classification matrix
Q2 <- matrix(c(0.85,  0.1, 0.05,
               0.1 ,  0.8, 0.1 ,
               0.05,  0.1, 0.85 ),byrow = TRUE, nrow = 3, ncol = 3)

# fit the model
m2 <- boschek.test(data = d2,Q = Q2)


FBartos/boschek.test documentation built on April 23, 2023, 5 p.m.