simulateThetas function

Estimates theta under different adaptive battery specifications

Estimates theta under different adaptive battery specifications

Takes in response profiles from multiple respondents and multiple Cat object (i.e., adaptive battery) specifications and returns a set of theta estimates

simulateThetas(catObjs = list(), responses, return_adaptive = FALSE)

Arguments

  • catObjs: A list of Cat objects of the same model with different adaptive battery specifications
  • responses: A matrix of response profiles
  • return_adaptive: Boolean indicating if user wants dataframe containing only answers chosen via the adaptive design for each Cat object in catObjs list.

Returns

The function simulateThetas returns a dataframe where each Cat object corresponds to a column and each respondent corresponds to a row if return_adaptive is FALSE, the default. Optionally, simulateThetas returns a list containing that dataframe plus dataframes for the answer profiles simulated via each adaptive design if return_adaptive is TRUE.

Details

The function takes multiple Cat objects, stored in a list, and generates an estimation for theta.

Examples

# Load Cat object data(grm_cat) # Simulate respondents respondents <- plyr::adply(.data = matrix(c(-1, 0, 1)), .margins = 1, .id = NULL, .fun = simulateRespondents, cat = grm_cat, n = 10) # A stopping rule (here, a common one) is required grm_cat@lengthThreshold <- 3 # Specify different adaptive inventory procedures grm_MAP <- grm_EAP <- grm_cat grm_MAP@estimation <- "MAP" grm_EAP@estimation <- "EAP" # List of Cat objects grmList <- list(cat1 = grm_MAP, cat2 = grm_EAP) # Results theta_est_results <- simulateThetas(catObjs = grmList, responses = respondents)

See Also

Cat-class, apply, selectItem

Author(s)

Haley Acevedo, Ryden Butler, Josh W. Cutler, Matt Malis, Jacob M. Montgomery, Tom Wilkinson, Erin Rossiter, Min Hee Seo, Alex Weil, Jaerin Kim, Dominique Lockett

  • Maintainer: Erin Rossiter
  • License: GPL-3
  • Last published: 2022-12-03

Useful links