generate_resp {irt}R Documentation

Generate random item responses (Response object)

Description

generate_resp Generate dichotomous (0 or 1) or polytomous responses for given ability and item parameter(s). This function returns a Response-class object.

Usage

generate_resp(ip, theta, prop_missing = 0)

Arguments

ip

An Item-class, Itempool-class, Testlet-class object containing the item parameters.

theta

An object containing the subject ability parameters.

prop_missing

Proportion of responses that should be missing. Default value is 0.

Value

Returns a list of Response-class objects with equal length to the length of theta.

Author(s)

Emre Gonulates

Examples

ip <- generate_ip(model = "3PL", n = 15)
generate_resp(ip, theta = rnorm(1))

# A list of Response objects
generate_resp(ip, theta = rnorm(5))

# Set the proportion of missing responses:
generate_resp(ip, theta = rnorm(5), prop_missing = 0.3)


[Package irt version 0.2.9 Index]