Title: | Nonparametric Item Response Theory |
---|---|
Description: | Fits nonparametric item and option characteristic curves using kernel smoothing. It allows for optimal selection of the smoothing bandwidth using cross-validation and a variety of exploratory plotting tools. The kernel smoothing is based on methods described in Silverman, B.W. (1986). Density Estimation for Statistics and Data Analysis. Chapman & Hall, London. |
Authors: | Angelo Mazza, Antonio Punzo, Brian McGuire |
Maintainer: | Brian McGuire <[email protected]> |
License: | GPL-2 |
Version: | 6.4 |
Built: | 2024-11-02 04:42:41 UTC |
Source: | https://github.com/cran/KernSmoothIRT |
Graphical analysis of multiple choice test and questionnaire data within a nonparametric approach. Fits item and option characteristic curves using kernel smoothing techniques and provides a variety of exploratory plots.
Package: | KernSmoothIRT |
Type: | Package |
Version: | 1.0 |
Date: | 2011-05-29 |
Requires: | plotrix |
License: | GPL-2 |
LazyLoad: | yes |
The function ksIRT
creates a ksIRT
object using kernel smoothing.
Plotting the ksIRT
object creates a variety of exploratory plots, including: item characteristic curves, option characteristic curves, density plots, expected value plots, and a probability simplex plot for the top 3 highest probability options of each item.
Angelo Mazza, Antonio Punzo, Brian McGuire
Maintainer: Brian McGuire <[email protected]>
Mazza A, Punzo A, McGuire B. (2014). KernSmoothIRT: An R Package for Kernel Smoothing in Item Response Theory. Journal of Statistical Software, 58 6, 1-34. URL: http://www.jstatsoft.org/v58/i06/.
Ramsay, J.O. (2000). TestGraf: A program for the graphical analysis of multiple choice test and questionnaire data.
Silverman, B.W. (1986). Density Estimation for Statistics and Data Analysis
The Beck Depression Inventory (Beck, Rush, Shaw & Emery, 1979) is a 21-question self-report inventory, one of the most widely used instruments for measuring the severity of depression. Each question has a set of four possible answer choices, ranging in intensity. In this dataset, the respondents are 242 McGill University students. The data were collected by Prof. David Zuroff.
data(BDI)
data(BDI)
BDIkey
a numeric vector with the highest level ordinal response for each of the 21 questions.
BDIresponses
is a numeric matrix with examinees responses. Each column represents a question and each row represents a subject; thus, BDIresponses
has 242 rows and 21 columns.
Ramsay JO (2000). TestGraf: A program for the graphical analysis of multiple choice test and questionnaire data.
Beck, A. T., Rush, A., Shaw, B. and Emery, G. (1979). Cognitive Therapy of Depression, New York: Guilford Press.
Santor, D. A., Ramsay, J. O. and Zuroff, D. C. (1994). Nonparametric item analyses of the Beck Depression Inventory: Evaluating gender item bias and response option weights. Psychological Assessment, 6, 255-270.
These data come from the Voluntary HIV Counseling and Testing Efficacy Study (2000a,b), conducted in 1995-1997, by the Center for AIDS Prevention Studies, University of California, San Francisco. This study was concerned with the effectiveness of HIV counseling and testing in reducing risk behavior for the sexual transmission of HIV. As part of this study, respondents were surveyed about their attitude toward condom use via a bank of 15 items. Respondents were asked how much they agreed with each of the statements on a 4-point response scale.
data(HIV)
data(HIV)
SITE
the site the participant attended. "Ken
" for Kenia, "Tan
" for Tanzania and "Tri
" for Trinidad.
GENDER
gender of participant
AGE
age (at last birthday) of participant
I1
Using condoms is a good way to protect you and your sex partner from diseases people can get from having sex.
I2
Sex doesn't feel as good when you use a condom.
I3
It's embarrassing to buy condoms.
I4
Using condoms is a good way to prevent an unwanted pregnancy.
I5
It's embarrassing to put on a condom (put a condom on a man).
I6
Most of your friends think you should use condoms whenever you have sex, including with your spouse.
I7
Condoms often break or slip off during sex.
I8
If your sex partner wants to use a condom, I'd suspect he/she may be having sex with someone else.
I9
Most of your friends use condoms when they have sex with a new partner.
I10
It is easy to buy condoms in the area where I now live.
I11
Most of your friends think that condoms are uncomfortable.
I12
Most of your friends think you should always use condoms when having sex with a new person.
I13
It is easy to get condoms in my home town without having to pay for them.
I14
Condoms cost too much.
I15
Most people your age are using condoms these days.
Given the "negative" wording of the items I2
, I3
, I5
, I7
, I8
, I11
, and I14
, in order to uniform the data, their scores has been reversed.
Voluntary HIV Counseling and Testing Efficacy Study (2000a,b), conducted in 1995-1997, by the Center for AIDS Prevention Studies, University of California, San Francisco.
Bertoli-Barsotti, L., Muschitiello, C. and Punzo A (2010). "Item Analysis of a Selected Bank from the Voluntary HIV-1 Counseling and Testing Efficacy Study Group." Technical Report 1, Dipartimento di Matematica, Statistica, Informatica e Applicazioni (Lorenzo Mascheroni), Universita degli Studi di Bergamo.
The Voluntary HIV-1 Counseling and Testing Efficacy Study Group (2000a). Efficacy of voluntary HIV-1 counselling and testing in individual and couples in Kenya, Tanzania, and Trinidad: A randomised trial. Lancet, 356, 103-112.
The Voluntary HIV-1 Counseling and Testing Efficacy Study Group (2000b). The Voluntary HIV-1 Counseling and Testing Efficacy Study: Design and Methods. AIDS and Behavior, 4(1), 5-14.
Returns a vector of point polyserial correlations for each item.
itemcor(x)
itemcor(x)
x |
a |
Ramsay, J.O. (2000). TestGraf: A program for the graphical analysis of multiple choice test and questionnaire data.
Silverman, B.W. (1986). Density Estimation for Statistics and Data Analysis. Chapman & Hall, London.
Fits nonparametric item and options characteristic curves using kernel smoothing techniques. Within the KernSmoothIRT package, it provides the relevant data for the graphical analysis of multiple choice test and questionnaire data.
ksIRT(responses, key, format, kernel = c("gaussian","quadratic","uniform"), itemlabels, weights,miss = c("option","omit","random.multinom","random.unif"), NAweight = 0, evalpoints, nevalpoints, bandwidth = c("Silverman","CV"), RankFun = "sum", SubRank, thetadist = list("norm",0,1), groups = FALSE, nsubj) ## S3 method for class 'ksIRT' print(x,...)
ksIRT(responses, key, format, kernel = c("gaussian","quadratic","uniform"), itemlabels, weights,miss = c("option","omit","random.multinom","random.unif"), NAweight = 0, evalpoints, nevalpoints, bandwidth = c("Silverman","CV"), RankFun = "sum", SubRank, thetadist = list("norm",0,1), groups = FALSE, nsubj) ## S3 method for class 'ksIRT' print(x,...)
responses |
input data matrix with options selected from each individual for each item. Rows represent individuals, columns represent items. Alternatively, a data.frame or list can be specified. Missing values are inserted as |
key |
a numeric vector or a scalar. If If the items are multiple choice, If the data are rating-scale, More complicated weighting schemes, such as partial credit, can be specified in the |
format |
a numeric scalar or vector specifying the type of items.
If all of the items are multiple choice, then |
kernel |
a character string specifying the kernel function. |
itemlabels |
optional list of labels for each item. If omitted, each item will be labelled according to its numerical order. These labels will be used in plotting. |
weights |
optional list that may be used in lieu of including |
miss |
a character string specifying the method used to manage missing responses. The default value,
|
NAweight |
a scalar value that specifies the weight given to missing responses when |
evalpoints |
an optional numeric vector that specifies the quantiles at which to estimate the Option Characteristic Curves.
If unspecified, the default is |
nevalpoints |
an optional scalar value that specifies the number of evenly spaced points at which curves are estimated. This value is used as an alternative to a user defined vector in the |
bandwidth |
either |
RankFun |
a function that is used to rank subjects. The default value is |
SubRank |
a numeric vector specifying the rank of each of the subjects. If unspecified and |
thetadist |
a list specifying the distribution to be used to thetadist (see Ramsay, 1991, p. 615) the subjects.
By default a standard normal distribution is used.
A different distribution can be adopted by specifying the first element of the list as |
groups |
an optional vector of length equal to the number of subjects containing the group designation of each subject. Adding this option allows for comparisons between groups using the Differential Item Functioning tools (see details section). |
nsubj |
an optional numeric value with the number of subjects. |
x |
a |
... |
further parameters |
When bandwidth="Silverman"
, the rule of thumb of Silverman (1986, p. 45) is implemented with the formula: 1.06*sigma.hat*nsubj^(-.2)
, where nsubj
is the number of subjects and sigma.hat
is the standard deviation of the subjscoresummary associated to the subjects according to the distribution specified with thetadist
.
Note that when thetadist=list("norm",mean,sd)
, sigma.hat
is the value specified for sd
.
Printing the ksIRT
object shows the point polyserial correlation correlation between each item and the overall test score.
Returned from this function is a ksIRT
object which is a list with the following components:
nitem |
an integer indicating the number of items. |
nsubj |
an integer indicating the number of subjects. |
nevalpoints |
an integer indicating the number of points for curve estimation. |
binaryresp |
a matrix of binary responses. Each row corresponds to a single option. The first three columns specify the item, the option, and the corresponding weight. Each additional column is a binary indicator of whether a subject selected that option. |
OCC |
a matrix with the first 3 columns the same as |
stderrs |
a matrix as |
subjscore |
a vector containing the observed score of each subject. |
itemlabels |
a list containing the label for each item. |
thetadist |
a list indicating the distribution used to rank subjects (see |
subjtheta |
a vector of quantile ranks for each subject on the distribution specified in |
evalpoints |
a vector with the subjscoresummary used in curve estimation. |
subjscoresummary |
a vector of subjscoresummary, of probabilities |
subjscoresummaryevalpoints |
a vector as |
SmthWgts |
a matrix containing the kernel weights. |
scale |
a vector indicating whether each item is multiple-choice, rating-scale or nominal; |
format |
returns the |
bandwidth |
a vector containing the bandwidths for each item. |
DIF |
a list of |
groups |
returns the |
itemcor |
a vector containing the point polyserial correlation for each item. |
RCC |
a list of |
subjthetaML |
the maximum likelihood estimate for the expected total score of each subject. |
Mazza A, Punzo A, McGuire B. (2014). KernSmoothIRT: An R Package for Kernel Smoothing in Item Response Theory. Journal of Statistical Software, 58 6, 1-34. URL: http://www.jstatsoft.org/v58/i06/.
Ramsay, J.O. (2000). TestGraf: A program for the graphical analysis of multiple choice test and questionnaire data.
Silverman, B.W. (1986). Density Estimation for Statistics and Data Analysis. Chapman & Hall, London.
## Psych101 data data(Psych101) Psych1 <- ksIRT(responses = Psychresponses[1:100,], key = Psychkey, format = 1) Psych1 plot(Psych1,plottype="OCC", item=c(24,25,92,96)) plot(Psych1,plottype="EIS", item=c(24,25,92,96)) plot(Psych1, plottype="tetrahedron", items=c(24,92)) plot(Psych1, plottype="triangle", items=c(24,92)) plot(Psych1, plottype="PCA") plot(Psych1,plottype="RCC", subjects=c(33,92)) PCA(Psych1) subjEIS(Psych1) subjETS(Psych1) subjOCC(Psych1, stype="ObsScore") subjscore(Psych1) subjthetaML(Psych1) subjscoreML(Psych1) plot(Psych1, plottype="expected") plot(Psych1, plottype="sd") plot(Psych1, plottype="density") ## HIV data data(HIV) HIVsubset <- HIV[c(c(1:50),c(1508:1558),c(2934:2984)),] gr2 <- as.character(HIVsubset$SITE) DIF2 <- ksIRT(res=HIVsubset[,-(1:3)], key=HIVkey, format = 2, groups=gr2, miss="omit") plot(DIF2, plottype="expectedDIF", lwd=2) plot(DIF2, plottype="densityDIF", lwd=2) plot(DIF2, plottype="EISDIF", item=c(6,11)) ### Ordinal Survey Data data(BDI) BDI1 <- ksIRT(responses=BDIresponses, key=BDIkey, format = 2, miss="omit") plot(BDI1, plottype="OCC", items=1:4) plot(BDI1, plottype="sd") plot(BDI1, plottype="density", ylim=c(0,0.1))
## Psych101 data data(Psych101) Psych1 <- ksIRT(responses = Psychresponses[1:100,], key = Psychkey, format = 1) Psych1 plot(Psych1,plottype="OCC", item=c(24,25,92,96)) plot(Psych1,plottype="EIS", item=c(24,25,92,96)) plot(Psych1, plottype="tetrahedron", items=c(24,92)) plot(Psych1, plottype="triangle", items=c(24,92)) plot(Psych1, plottype="PCA") plot(Psych1,plottype="RCC", subjects=c(33,92)) PCA(Psych1) subjEIS(Psych1) subjETS(Psych1) subjOCC(Psych1, stype="ObsScore") subjscore(Psych1) subjthetaML(Psych1) subjscoreML(Psych1) plot(Psych1, plottype="expected") plot(Psych1, plottype="sd") plot(Psych1, plottype="density") ## HIV data data(HIV) HIVsubset <- HIV[c(c(1:50),c(1508:1558),c(2934:2984)),] gr2 <- as.character(HIVsubset$SITE) DIF2 <- ksIRT(res=HIVsubset[,-(1:3)], key=HIVkey, format = 2, groups=gr2, miss="omit") plot(DIF2, plottype="expectedDIF", lwd=2) plot(DIF2, plottype="densityDIF", lwd=2) plot(DIF2, plottype="EISDIF", item=c(6,11)) ### Ordinal Survey Data data(BDI) BDI1 <- ksIRT(responses=BDIresponses, key=BDIkey, format = 2, miss="omit") plot(BDI1, plottype="OCC", items=1:4) plot(BDI1, plottype="sd") plot(BDI1, plottype="density", ylim=c(0,0.1))
Returns a vector with each subjects expected test score.
PCA(x,...)
PCA(x,...)
x |
a |
... |
other arguments to pass to the |
Ramsay, J.O. (2000). TestGraf: A program for the graphical analysis of multiple choice test and questionnaire data.
Silverman, B.W. (1986). Density Estimation for Statistics and Data Analysis. Chapman & Hall, London.
The plot method for ksIRT
objects includes a variety of exploratory plotting tools.
## S3 method for class 'ksIRT' plot(x, plottype = c("OCC", "EIS", "density", "expected", "sd", "triangle", "tetrahedron", "RCC", "EISDIF", "OCCDIF", "PCA", "expectedDIF", "densityDIF"), items = "all", subjects, axistype = c("scores", "distribution"), alpha, main, xlab, ylab, xlim, ylim, cex, ...)
## S3 method for class 'ksIRT' plot(x, plottype = c("OCC", "EIS", "density", "expected", "sd", "triangle", "tetrahedron", "RCC", "EISDIF", "OCCDIF", "PCA", "expectedDIF", "densityDIF"), items = "all", subjects, axistype = c("scores", "distribution"), alpha, main, xlab, ylab, xlim, ylim, cex, ...)
x |
a |
plottype |
the type of plot to be created (see section Details below).
With the default value, |
items |
a vector containing the items to be plotted.
With the default value, |
alpha |
either |
subjects |
a vector specifying the subjects to plot.
This argument is only used when |
axistype |
a character string specifying the display variable to be used on the x-axis.
The default is |
main , xlab , ylab , xlim , ylim , cex
|
plotting parameters (see |
... |
further plotting parameters. |
Possible values for plottype are:
plottype="density"
produces a simple kernel density plot of the observed scores.
plottype="EIS"
plot of the expected item scores for each of the item numbers in the items
argument.
plottype="OCC"
plot of the option characteristic curves for each of the item numbers in the items
argument.
plottype="expected"
plot of the observed vs. expected scores.
plottype="sd"
plot of the standard deviation of observed scores.
plottype="RCC"
plots the RCC and actual score for each subject specified by the subjects
argument.
plottype="triangle"
produces a triangle simplex plot with the highest 3 probability options for each item specified by the items
argument.
plottype="tetrahedron"
produces a tetrahedron simplex plot with the highest 4 probability options for each item specified by the items
argument. The tetrahedron plot can be rotated by using the mouse.
plottype="PCA"
produces Principle Component Analysis plot of the test.
Below are values for plottype
used for Differential Item Functioning (DIF) plots.
They are available only if the groups
argument is specified when creating the ksIRT
object:
plottype="densityDIF"
plots density of observed scores for each of the different groups.
plottype="expectedDIF"
plots pairwise expected value comparison plots for each of the different groups.
plottype="EISDIF"
plots expected item scores for each of the different groups.
Accepts the same arguments as plottype="EIS"
, but by default does not show confidence intervals.
This can be changed with the alpha
argument.
plottype="OCCDIF"
plots option characteristic curves for each of the different groups.
Accepts the same arguments as plottype="OCC"
No values are returned from the plot function.
Mazza A, Punzo A, McGuire B. (2014). KernSmoothIRT: An R Package for Kernel Smoothing in Item Response Theory. Journal of Statistical Software, 58 6, 1-34. URL: http://www.jstatsoft.org/v58/i06/.
Ramsay, J.O. (2000). TestGraf: A program for the graphical analysis of multiple choice test and questionnaire data.
A multiple-choice examination given to 379 students in an introductory course in psychology in the Christmas exam period of 1989 at McGill. The test consisted of 100 multiple-choice items, each having four response options.
data(Psych101)
data(Psych101)
Psychkey
is a numeric vector with the correct responses for each of the 100 questions on the exam.
Psychresponses
is a numeric matrix with students' answers. Each column represents a question and each row represents a student.
See ksIRT()
help page for more information and examples on how to use these data with the KernSmoothIRT package.
Ramsay, J.O. (2000). TestGraf: A program for the graphical analysis of multiple choice test and questionnaire data.
Ramsay, J.O. and Abrahamowicz M. (1989). Binomial regression with monotone splines: A psychometric application. Journal of the American Statistical Association, 84(408), 906-915.
Ramsay, J.O. (2000). TestGraf: A program for the graphical analysis of multiple choice test and questionnaire data.
Returns a matrix containing each subject's expected item score. The rows represent items and the columns, subjects.
subjEIS(x)
subjEIS(x)
x |
a |
Ramsay, J.O. (2000). TestGraf: A program for the graphical analysis of multiple choice test and questionnaire data.
Silverman, B.W. (1986). Density Estimation for Statistics and Data Analysis. Chapman & Hall, London.
Applies only when the groups
argument is specified. It returns a matrix containing each subject's expected item score. The rows represent items and the columns, subjects.
subjEISDIF(x)
subjEISDIF(x)
x |
a |
Ramsay, J.O. (2000). TestGraf: A program for the graphical analysis of multiple choice test and questionnaire data.
Silverman, B.W. (1986). Density Estimation for Statistics and Data Analysis. Chapman & Hall, London.
Returns a vector with each subjects expected test score.
subjETS(x)
subjETS(x)
x |
a |
Ramsay, J.O. (2000). TestGraf: A program for the graphical analysis of multiple choice test and questionnaire data.
Silverman, B.W. (1986). Density Estimation for Statistics and Data Analysis. Chapman & Hall, London.
Applies only when the groups
argument is specified. It returns a vector with each subjects expected test score.
subjETSDIF(x)
subjETSDIF(x)
x |
a |
Ramsay, J.O. (2000). TestGraf: A program for the graphical analysis of multiple choice test and questionnaire data.
Silverman, B.W. (1986). Density Estimation for Statistics and Data Analysis. Chapman & Hall, London.
Returns a list containing a matrix for each item. Each matrix in the list contains a row for each option with each column representing a subject with the probability of selecting that option for each subject.
subjOCC(x, stype = c("ObsScore","ExpectedScore","MLScore","Theta","MLTheta"))
subjOCC(x, stype = c("ObsScore","ExpectedScore","MLScore","Theta","MLTheta"))
x |
a |
stype |
the scale on which to evaluate each subject. |
Ramsay, J.O. (2000). TestGraf: A program for the graphical analysis of multiple choice test and questionnaire data.
Silverman, B.W. (1986). Density Estimation for Statistics and Data Analysis. Chapman & Hall, London.
Applies only when the groups
argument is specified. It returns a list containing a matrix for each item for each of the different groups. Each matrix in the list contains a row for each option with each column representing a subject with the probability of selecting that option for each subject.
subjOCCDIF(x, stype = c("ObsScore","Theta","ThetaML","ScoreML"))
subjOCCDIF(x, stype = c("ObsScore","Theta","ThetaML","ScoreML"))
x |
a |
stype |
the scale on which to evaluate each subject. |
Ramsay, J.O. (2000). TestGraf: A program for the graphical analysis of multiple choice test and questionnaire data.
Silverman, B.W. (1986). Density Estimation for Statistics and Data Analysis. Chapman & Hall, London.
Returns a vector of scores for each subject.
subjscore(x)
subjscore(x)
x |
a |
Ramsay, J.O. (2000). TestGraf: A program for the graphical analysis of multiple choice test and questionnaire data.
Silverman, B.W. (1986). Density Estimation for Statistics and Data Analysis. Chapman & Hall, London.
Returns the maximum likelihood estimate for each subject.
subjscoreML(x)
subjscoreML(x)
x |
a |
Ramsay, J.O. (2000). TestGraf: A program for the graphical analysis of multiple choice test and questionnaire data.
Silverman, B.W. (1986). Density Estimation for Statistics and Data Analysis. Chapman & Hall, London.
Returns the maximum likelihood estimate for each subject.
subjthetaML(x)
subjthetaML(x)
x |
a |
Ramsay, J.O. (2000). TestGraf: A program for the graphical analysis of multiple choice test and questionnaire data.
Silverman, B.W. (1986). Density Estimation for Statistics and Data Analysis. Chapman & Hall, London.