Learn R Programming

careless (version 1.2.2)

evenodd: Calculates the even-odd consistency score

Description

Takes a matrix of item responses and a vector of integers representing the length each factor. The even-odd consistency score is then computed as the within-person correlation between the even and odd subscales over all the factors.

Usage

evenodd(x, factors, diag = FALSE)

Arguments

x

a matrix of data (e.g. survey responses)

factors

a vector of integers specifying the length of each factor in the dataset

diag

optionally returns a column with the number of available (i.e., non-missing) even/odd pairs per observation. Useful for datasets with many missing values.

Author

Richard Yentes ryentes@gmail.com, Francisco Wilhelm franciscowilhelm@gmail.com

References

Johnson, J. A. (2005). Ascertaining the validity of individual protocols from web-based personality inventories. Journal of Research in Personality, 39, 103-129. tools:::Rd_expr_doi("10.1016/j.jrp.2004.09.009")

Examples

Run this code
careless_eo <- evenodd(careless_dataset, rep(5,10))
careless_eodiag <- evenodd(careless_dataset, rep(5,10), diag = TRUE)

Run the code above in your browser using DataLab