Learn R Programming

dexter (version 0.8.5)

information: Functions of theta

Description

returns information function, expected score function or score simulation function for a single item, an arbitrary group of items or all items

Usage

information(parms, items = NULL, booklet_id = NULL,
  which.draw = NULL)

expected_score(parms, items = NULL, booklet_id = NULL, which.draw = NULL)

r_score(parms, items = NULL, booklet_id = NULL, which.draw = NULL)

Arguments

parms

object produced by fit_enorm

items

vector of one or more item_id's. If NULL and booklet_id is also NULL, all items in parms are used

booklet_id

id of a single booklet (e.g. the test information function), if items is not NULL this is ignored

which.draw

the number of the random draw (only applicable if calibration method was Bayes). If NULL, the mean beta parameter will be used

Value

Each function returns a new function which accepts a vector of theta's. These return the following values:

information

an equal length vector with the information estimate at each value of theta.

expected_score

an equal length vector with the expected score at each value of theta

r_score

a matrix with length(theta) rows and one column for each item containing simulated scores based on theta. To obtain test scores, use rowSums on this matrix

Examples

Run this code
# NOT RUN {
db = start_new_project(verbAggrRules,':memory:')
add_booklet(db,verbAggrData, "agg")
p = fit_enorm(db)

# plot information function for single item

ifun = information(p, "S1DoScold")

plot(ifun,from=-4,to=4)

# compare test information function to the population ability distribution

ifun = information(p, booklet="agg")

pv = plausible_values(db,p)

op = par(no.readonly=TRUE)
par(mar = c(5,4,2,4))

plot(ifun,from=-4,to=4, xlab='theta', ylab='test information')

par(new=TRUE)

plot(density(pv$PV1), col='green', axes=FALSE,xlab=NA, ylab=NA,main=NA)
axis(side=4)
mtext(side = 4, line = 2.5, 'population density (green)')

par(op)
close_project(db)

# }

Run the code above in your browser using DataLab