Learn R Programming

catSurv (version 1.3.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)

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.

Value

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

Examples

Run this code
# NOT RUN {
# 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