README.md

DOTA2

R package for discrete option test analysis

Installation

library("devtools") # if not available: install.packages("devtools")
install_github("m-Py/DOTA2")

# load the package via 
library("DOTA2")

Usage

Retrieve data

The function get_response_table can be used to read test data from an Unipark-exported JSON string:


## `testData` is a vector of Unipark-exported JSON strings; `id` is a
## vector of unique test-taker IDs. 

test_dat <- get_response_table(testData, id)

The by_option parameter controls whether response data is retrieved on the level of an item or on the level of each option in each item. It defaults to FALSE, i.e. in the default case we retrieve response data on item level. If by_option is TRUE we retrieve response data for each response option.


item_data <- get_response_table(testData, id, by_option = FALSE)
option_data <- get_response_table(testData, id, by_option = TRUE)

Data description

get_response_table returns a data.frame in long format.

Item data

If by_option is FALSE, each row represents an item, the test-taker who responded to the item is represented in the column id. The column item_id contains the ID representing the item. Additionally (as of the time of this writing), the following columns are stored:

If the test is a DOMC test, the following information is also stored:

These columns have a different meaning in a DOMC test:

Option data

If by_option is TRUE, each row represents an option. The test-taker who responded to the option is represented in the column id. The column item_id contains the ID representing the item the option belongs to. The column option_id contains the ID of the response option. Additionally (as of the time of this writing), the following columns are stored:

For DOMC tests, the following additional data is stored:

Merging option and item data

Option and item response data can be joined if that is desired (it does however make the interpretation of column names more ambiguous):


merge(item_data, option_data, by = c("id", "item_id"))



m-Py/DOTA2 documentation built on May 19, 2019, 3 a.m.