# NOT RUN {
o <- options(digits = 4)
## load verbal aggression data
data("VerbalAggression", package = "psychotools")
## fit a rasch model to dichotomized verbal aggression data
raschmod <- raschmodel(VerbalAggression$resp2)
## extract threshold parameters with sum zero restriction
tr <- threshpar(raschmod)
tr
## compare to item parameters (again with sum zero restriction)
ip <- itempar(raschmod)
ip
all.equal(coef(tr), coef(ip))
## rating scale model example
rsmod <- rsmodel(VerbalAggression$resp)
trmod <- threshpar(rsmod, type = "mode")
trmed <- threshpar(rsmod, type = "median")
trmn <- threshpar(rsmod, type = "mean")
## compare different types of threshold parameters
cbind("Mode" = coef(trmod, type = "vector"),
"Median" = coef(trmod, type = "vector"),
"Mean" = coef(trmn, type = "vector"))
options(digits = o$digits)
# }
Run the code above in your browser using DataLab