response_prop {latent2likert}R Documentation

Calculate Response Proportions

Description

Returns a table of proportions for each possible response category.

Usage

response_prop(data, n_levels)

Arguments

data

numeric vector or matrix of responses.

n_levels

number of response categories.

Value

A table of response category proportions.

Examples

data <- c(1, 2, 2, 3, 3, 3)
response_prop(data, n_levels = 3)

data_matrix <- matrix(c(1, 2, 2, 3, 3, 3), ncol = 2)
response_prop(data_matrix, n_levels = 3)

[Package latent2likert version 1.2.1 Index]