Learn R Programming

catSurv (version 1.5.0)

simulateRespondents: Simulate answer profiles given some true value of theta

Description

The function simulates n answer profiles given a true value of theta and a battery's item parameters stored in a Cat object.

Usage

# S4 method for Cat
simulateRespondents(catObj, theta, n)

Value

Function returns a dataframe where each row is a possible answer profile simulated given the provided value of theta

Arguments

catObj

An object of class Cat

theta

A numeric representing the true position on the latent trait.

n

A numeric indicating the number of answer profiles to simulate.

Author

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

Examples

Run this code

# Load Cat object
data(grm_cat)

# Simulate 5 response profiles given a theta of 2
sim_resp <- simulateRespondents(catObj = grm_cat, theta = 2, n = 5)


Run the code above in your browser using DataLab