| Type: | Package | 
| Title: | Model Response Styles in Partial Credit Models | 
| Version: | 0.1-5 | 
| Date: | 2025-07-22 | 
| Maintainer: | Gunther Schauberger <gunther.schauberger@tum.de> | 
| Description: | Implementation of PCMRS (Partial Credit Model with Response Styles) as proposed in by Tutz, Schauberger and Berger (2018) <doi:10.1177/0146621617748322> . PCMRS is an extension of the regular partial credit model. PCMRS allows for an additional person parameter that characterizes the response style of the person. By taking the response style into account, the estimates of the item parameters are less biased than in partial credit models. | 
| License: | GPL-2 | GPL-3 [expanded from: GPL (≥ 2)] | 
| Imports: | Rcpp (≥ 0.12.4) | 
| Depends: | ltm, statmod, cubature, mvtnorm, parallel | 
| LinkingTo: | Rcpp, RcppArmadillo | 
| RoxygenNote: | 7.3.2 | 
| Encoding: | UTF-8 | 
| NeedsCompilation: | yes | 
| Packaged: | 2025-07-22 07:32:55 UTC; ge29weh | 
| Author: | Gunther Schauberger [aut, cre] | 
| Repository: | CRAN | 
| Date/Publication: | 2025-07-22 08:32:38 UTC | 
Model Response Styles in Partial Credit Models
Description
Performs PCMRS, a method to model response styles in Partial Credit Models
Author(s)
Maintainer: Gunther Schauberger gunther.schauberger@tum.de
Gunther Schauberger
 gunther.schauberger@tum.de
https://www.sg.tum.de/epidemiologie/team/schauberger/
References
Tutz, Gerhard, Schauberger, Gunther and Berger, Moritz (2018): Response Styles in the Partial Credit Model, Applied Psychological Measurement, doi:10.1177/0146621617748322
See Also
PCMRS, person.posterior, tenseness, emotion
Examples
## Not run: 
################################################
## Small example to illustrate model and person estimation
################################################
data(tenseness)
set.seed(5)
samples <- sample(1:nrow(tenseness), 100)
tense_small <- tenseness[samples,1:4]
m_small <- PCMRS(tense_small, cores = 2)
m_small
plot(m_small)
persons <- person.posterior(m_small, cores = 2)
plot(jitter(persons, 100))
################################################
## Example from Tutz et al. 2017:
################################################
data(emotion)
m.emotion <- PCMRS(emotion)
m.emotion
plot(m.emotion)
## End(Not run)
Model Response Styles in Partial Credit Models
Description
Performs PCMRS, a method to model response styles in Partial Credit Models
Usage
PCMRS(
  Y,
  Q = 10,
  scaled = TRUE,
  method = c("L-BFGS-B", "nlminb"),
  cores = 30,
  lambda = 0
)
Arguments
| Y | Data frame containing the ordinal item response data (as ordered factors), one row per obeservation, one column per item. | 
| Q | Number of nodes to be used (per dimension) in two-dimensional Gauss-Hermite-Quadrature. | 
| scaled | Should the scaled version of the response style parameterization be used? Default is  | 
| method | Specifies optimization algorithm used by  | 
| cores | Number of cores to be used in parallelized computation. | 
| lambda | Tuning parameter for optional L2 penalty on coefficient vector (for stabilized estimation) | 
Value
| delta | Matrix containing all item parameters for the PCMRS model, one row per item, one column per category. | 
| Sigma | 2*2 covariance matrix for both random effects, namely the ability parameters theta and the response style parameters gamma. | 
| delta.PCM | Matrix containing all item parameters for the simple PCM model, one row per item, one column per category. | 
| sigma.PCM | Estimate for variance of ability parameters theta in the simple PCM model. | 
| Y | Data frame containing the ordinal item response data, one row per obeservation, one column per item. | 
| scaled | Logical,  | 
| neg.loglik | Negative marginal log-likelihood | 
Author(s)
Gunther Schauberger
 gunther.schauberger@tum.de
https://www.sg.tum.de/epidemiologie/team/schauberger/
References
Tutz, Gerhard, Schauberger, Gunther and Berger, Moritz (2018): Response Styles in the Partial Credit Model, Applied Psychological Measurement, doi:10.1177/0146621617748322
See Also
person.posterior PCMRS-package
Examples
## Not run: 
################################################
## Small example to illustrate model and person estimation
################################################
data(tenseness)
set.seed(5)
samples <- sample(1:nrow(tenseness), 100)
tense_small <- tenseness[samples,1:4]
m_small <- PCMRS(tense_small, cores = 2)
m_small
plot(m_small)
persons <- person.posterior(m_small, cores = 2)
plot(jitter(persons, 100))
################################################
## Example from Tutz et al. 2017:
################################################
data(emotion)
m.emotion <- PCMRS(emotion)
m.emotion
plot(m.emotion)
## End(Not run)
Emotional reactivity data from the Freiburg Complaint Checklist (emotion)
Description
Data from the Freiburg Complaint Checklist. The data contain all 8 items corresponding to the scale Emotional reactivity for 2032 participants of the standardization sample of the Freiburg Complaint Checklist.
Format
A data frame containing data from the Freiburg Complaint Checklist with 2032 observations. All items refer to the scale Emotional reactivity and are measured on a 5-point Likert scale where low numbers correspond to low frequencies or low intensitites of the respective complaint and vice versa.
- Feel upset in whole body
- Do you feel it in the whole body when you get upset about something? 
- Eyes well up with tears
- Do your eyes well up with tears in certain situations? 
- Stammer
- Do you sometimes start stammering in certain situations? 
- Blush
- Do you blush? 
- Gasp for air
- Do you have to gasp for air in exciting situations, so that you have to take a deep breath? 
- Rapid heartbeat in excitement
- Do you feel a rapid heartbeat in excitement? 
- Urge to defecate in excitement
- Do you feel the urge to defecate in excitement? 
- Trembling knees
- Do you start trembling in excitement or do you get trembling knees? 
Source
ZPID (2013). PsychData of the Leibniz Institute for Psychology Information ZPID. Trier: Center for Research Data in Psychology.
Fahrenberg, J. (2010). Freiburg Complaint Checklist [Freiburger Beschwerdenliste (FBL)]. Goettingen, Hogrefe.
References
Tutz, Gerhard, Schauberger, Gunther and Berger, Moritz (2018): Response Styles in the Partial Credit Model, Applied Psychological Measurement, doi:10.1177/0146621617748322
Examples
## Not run: 
data(emotion)
m.emotion <- PCMRS(emotion)
m.emotion
plot(m.emotion)
## End(Not run)
Calculate Posterior Estimates for Person Parameters
Description
Calculates posterior estimates for both person parameters, namely the ability parameters theta and the response style parameters gamma.
Usage
person.posterior(model, cores = 30, tol = 1e-04, maxEval = 600, which = NULL)
Arguments
| model | Object of class  | 
| cores | Number of cores to be used in parallelized computation. | 
| tol | The maximum tolerance for numerical integration, default 1e-4. 
For more details see  | 
| maxEval | The maximum number of function evaluations needed in numerical integration.
If specified as 0 implies no limit. For more details see  | 
| which | Optional vector to specify that only for a subset of all persons the posterior estimate is calculated. | 
Value
Matrix containing all estimates of person parameters, both theta and gamma.
Author(s)
Gunther Schauberger
 gunther.schauberger@tum.de
https://www.sg.tum.de/epidemiologie/team/schauberger/
References
Tutz, Gerhard, Schauberger, Gunther and Berger, Moritz (2018): Response Styles in the Partial Credit Model, Applied Psychological Measurement, doi:10.1177/0146621617748322
See Also
Examples
## Not run: 
################################################
## Small example to illustrate model and person estimation
################################################
data(tenseness)
set.seed(5)
samples <- sample(1:nrow(tenseness), 100)
tense_small <- tenseness[samples,1:4]
m_small <- PCMRS(tense_small, cores = 2)
m_small
plot(m_small)
persons <- person.posterior(m_small, cores = 2)
plot(jitter(persons, 100))
################################################
## Example from Tutz et al. 2017:
################################################
data(emotion)
m.emotion <- PCMRS(emotion)
m.emotion
plot(m.emotion)
## End(Not run)
Tenseness data from the Freiburg Complaint Checklist (tenseness)
Description
Data from the Freiburg Complaint Checklist. The data contain all 8 items corresponding to the scale Tenseness for 2042 participants of the standardization sample of the Freiburg Complaint Checklist.
Format
A data frame containing data from the Freiburg Complaint Checklist with 2042 observations. All items refer to the scale Tenseness and are measured on a 5-point Likert scale where low numbers correspond to low frequencies or low intensitites of the respective complaint and vice versa.
- Clammy hands
- Do you have clammy hands? 
- Sweat attacks
- Do you have sudden attacks of sweating? 
- Clumsiness
- Do you notice that you behave clumsy? 
- Wavering hands
- Are your hands wavering frequently, e.g. when lightning a cigarette or when holding a cup? 
- Restless hands
- Do you notice that your hands are restless? 
- Restless feet
- Do you notice that your feet are restless? 
- Twitching eyes
- Do you notice unvoluntary twitching of your eyes? 
- Twitching mouth
- Do you notice unvoluntary twitching of your mouth? 
Source
ZPID (2013). PsychData of the Leibniz Institute for Psychology Information ZPID. Trier: Center for Research Data in Psychology.
Fahrenberg, J. (2010). Freiburg Complaint Checklist [Freiburger Beschwerdenliste (FBL)]. Goettingen, Hogrefe.
References
Tutz, Gerhard, Schauberger, Gunther and Berger, Moritz (2018): Response Styles in the Partial Credit Model, Applied Psychological Measurement, doi:10.1177/0146621617748322
Examples
## Not run: 
data(tenseness)
set.seed(1860)
samples <- sample(1:nrow(tenseness), 300)
tense_small <- tenseness[samples,]
m_small <- PCMRS(tense_small, cores = 25)
m_small
plot(m_small)
persons <- person.posterior(m_small, cores = 25)
plot(jitter(persons,100))
## End(Not run)