Learn R Programming

OpenRepGrid (version 0.1.16)

matches: Number of matches in ratings

Description

Count the number of matches, i.e. (near) identical ratings between two elements or constructs. Matches are used as the basis for the calculation of grid indexes.

Usage

matches(x, deviation = 0, diag.na = TRUE)

Value

A list of class org.matches with:

  • grid: The grid used to calculate the matches.

  • deviation The deviation parameter.

  • max_constructs Maximum possible number of matches across constructs.

  • max_elements Maximum possible number of matches across elements.

  • total_constructs Total number of matches across constructs.

  • total_elements Total number of matches across elements.

  • constructs: Matrix with no. of matches for constructs.

  • elements: Matrix with no. of matches for elements.

Arguments

x

A repgrid object.

deviation

Maximal difference between ratings to be considered a match (default 0 = only identical rating scores are a match). Especially useful for long rating scale (e.g. 0 to 100).

diag.na

Whether to set the diagonal of the matrices to NA (default is TRUE).

Examples

Run this code
m <- matches(boeker)

# several output options
print(m, index = FALSE, names = FALSE, upper = FALSE)
print(m, output = "C")  # construct matches
print(m, output = "E")  # element matches

# extract the matrices
m$constructs
m$elements

Run the code above in your browser using DataLab