Learn R Programming

xxIRT (version 2.0.1)

irt_select: Subset IRT Model

Description

Subset and sample from an IRT model object

Usage

irt_select(x, people.index = NULL, items.index = NULL)

irt_sample(x, n.people = NULL, n.items = NULL)

Arguments

x

an IRT model object

people.index

the indices of people to keep

items.index

the indices of items to keep

n.people

the nubmer of people to sample

n.items

the number of items to sample

Examples

Run this code
# NOT RUN {
# subset
x <- irt_model("3pl")$gendata(10, 5)
irt_select(x, people.index=c(1,3,5))
irt_select(x, items.index=c(1,3,5))
# sample wihtout replacement
irt_sample(x, n.people=3)
irt_sample(x, n.items=3)
# sample with replacement
irt_sample(x, n.people=30)
irt_sample(x, n.items=30)
# }

Run the code above in your browser using DataLab