Skip to contents

Auxiliary function written in R for providing the necessary information about the patterns generated by raters. This function produces the input for the EM-algorithm.

Usage

get_patterns(data, categorical_levels)

Arguments

data

Matrix or data.frame containing the ratings. The cases are in the rows and the raters are in the columns. Characters in the cells are supported. At least two raters are necessary.

categorical_levels

Vector containing all possible categories of the content analysis.

Value

Function returns a list with the following components:

n

Integer representing the number of different patterns in the data.

shape

Matrix containing all unique patterns in in the data. Cells of the matrix are characters.

frq

Vector containing the frequencies of the patterns.

count

Matrix containing the relative frequencies of the categories within each pattern. The number of rows equals the number of patterns. The number of columns equals the number of categories.