Description Usage Arguments Details Value References Examples
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.
1 2 3 4 5 6 7 | 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.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 | ## 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))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.