View source: R/theta_functions.R
information | R Documentation |
returns information function, expected score function, score simulation function, or score distribution for a single item, an arbitrary group of items or all items
information(
parms,
items = NULL,
booklet_id = NULL,
parms_draw = c("average", "sample")
)
expected_score(
parms,
items = NULL,
booklet_id = NULL,
parms_draw = c("average", "sample")
)
r_score(
parms,
items = NULL,
booklet_id = NULL,
parms_draw = c("average", "sample")
)
p_score(
parms,
items = NULL,
booklet_id = NULL,
parms_draw = c("average", "sample")
)
parms |
object produced by |
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 |
parms_draw |
when the item parameters are estimated with method "Bayes" (see: |
Each function returns a new function which accepts a vector of theta's. These return the following values:
an equal length vector with the information estimate at each value of theta.
an equal length vector with the expected score at each value of theta
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
a matrix with length(theta) rows and one column for each possible sumscore containing the probability of the score given theta
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.