consensus: Consensus for an item

Description Usage Arguments Details Value Examples

Description

Compute the consensus for an item, based on Tastle & Wiermann, (2006).

Usage

1
consensus(item, range = NULL, consensus.only = FALSE, round = 2)

Arguments

item

The item that should be analyzed.

range

The range of the item indicating the valid values. Default is NULL.

consensus.only

Logical, if only the consensus should be reported. Default is to FALSE.

round

The number of digits to round the result to. Default is to 2.

Details

n

The number of valid answers on that item

min

The minimum answer on that item

max

The maximum answer on that item

consensus

The consensus

dissensus

The dissensus

n_missing

The absolute number of missing values on that item, defined as NA

perc_missing

The relative number of missing values on that item, defined as NA

Value

Returns an data frame with the consensus and additional information for each item. See details for further explanation.

Examples

1
2
3
4
5
6
item <- c(rep(1, 19), rep(2, 8), rep(3, 26), rep(4, 29),
          rep(5, 5), rep(NA, 5), rep(-2, 4), rep(-3, 4))
consensus(item, range = c(1, 5), round = 4)
## or the original example from the article:
item <- c(rep(1, 19), rep(2, 16), rep(3, 26), rep(4, 29), rep(5, 10))
consensus(item, range = c(1, 5), round = 3)

kthorstmann/consr documentation built on May 20, 2019, 7:04 p.m.