Learn R Programming

catSurv (version 1.3.0)

simulateThetas: Estimates theta under different adaptive battery specifications

Description

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

Usage

simulateThetas(catObjs = list(), responses)

Arguments

catObjs

A list of Cat objects of the same model with different adaptive battery specifications

responses

A matrix of response profiles

Value

The function allFish returns a dataframe where each Cat object corresponds to a column and each respondent corresponds to a row.

Details

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

See Also

Cat-class, apply, selectItem

Examples

Run this code
# NOT RUN {
# Load Cat object
data(grm_cat)
   
# Simulate respondents
# 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(grm_MAP, grm_EAP)

# Results
theta_est_results <- simulateThetas(catObjs = grmList, responses = respondents)

# }

Run the code above in your browser using DataLab