get_ac_weights: Get Agreement Coefficient Weights

View source: R/ac-weights.R

get_ac_weightsR Documentation

Get Agreement Coefficient Weights

Description

This function retrieves or creates a weights matrix for calculating agreement coefficients based on a specified weighting scheme. Basically, a wrapper around ac_weights.

Usage

get_ac_weights(weights = "unweighted", q)

Arguments

weights

A character string specifying the type of weight to use. One of "unweighted", "quadratic", "linear", "ordinal", "radical", "ratio", "circular", "bipolar", or a custom matrix. Default is "unweighted".

q

The number of categories in the agreement matrix.

Value

A list containing:

w_name

The name of the weight type or "Custom Weights".

weights_mat

The corresponding weights matrix.

Examples

get_ac_weights(weights = "quadratic", q = 4)
get_ac_weights(weights = matrix(c(1, 0.5, 0, 0,
                                  0.5, 1, 0.5, 0,
                                  0, 0.5, 1, 0.5,
                                  0, 0, 0.5, 1), ncol = 4), q = 4)

emilelatour/lagree documentation built on Sept. 18, 2024, 5:19 p.m.