Item Analysis Function
item_analysis(
resp,
criterion = NULL,
ip = NULL,
stats = c("n", "pval", "pbis", "bis", "pbis_adj", "bis_adj"),
suppress_output = FALSE
)
A data.frame with following columns:
Item ID.
Number of examinees responded this item.
p-value, proportion of examinees correctly answered items. If there are polytomous items in the data, p-value will be calculated by dividing the mean of the scores for the item by the maximum possible score of the item.
Unadjusted p-value, this is the mean of item scores
that is not adjusted for the maximum possible score as 'pval'
column does. For dichotomous items, this will be the same as
'pval'
column.
Point biserial correlation.
Biserial correlation.
Point biserial correlation between item and total score
without this item. Note that this stat is only available when
criterion is NULL
.
Biserial correlation between item and total score
without this item. Note that this stat is only available when
criterion is NULL
.
A Response_set-class
object, matrix
or
data.frame
containing the item responses.
Provide a continuous criterion variable such as a total
raw score, or theta score that will be used in the calculation of
correlation calculations. If this value is NULL
, the total score
will be used.
An Itempool-class
object. This will help function
in two ways. First, if the resp
is
a Response_set-class
object, the function will help the
responses to be arranged in the same order as ip
. Second, if there
are polytomous items in the data, ip
will help finding the maximum
values of each item. Otherwise, the maximum values each item can take
will be calculated using data, which may be fallible.
A vector of string containing the columns/statistics to be
calculated. 'item_id'
column will be added by default. Some or all
of the following columns can be added to the output:
c("n", "pval", "pbis", "bis", "pbis_adj", "bis_adj")
.
Please see the 'value' section below to see the details of these columns.
By default, all of the columns above will be calculated.
If TRUE
, the function will suppress
console output. Default value is FALSE
Emre Gonulates
theta <- rnorm(100)
ip <- generate_ip(n = 20)
resp <- sim_resp(ip = ip, theta = theta, prop_missing = .2)
# Item analysis based on total scores
item_analysis(resp)
# Item analysis based on theta scores
item_analysis(resp, criterion = theta)
Run the code above in your browser using DataLab