Type: | Package |
Title: | Model Multivariate Ordinal Responses Including Response Styles |
Version: | 0.1-3 |
Date: | 2024-01-23 |
Author: | Gunther Schauberger |
Maintainer: | Gunther Schauberger <gunther.schauberger@tum.de> |
Description: | In the case of multivariate ordinal responses, parameter estimates can be severely biased if personal response styles are ignored. This packages provides methods to account for personal response styles and to explain the effects of covariates on the response style, as proposed by Schauberger and Tutz 2021 <doi:10.1177/1471082X20978034>. The method is implemented both for the multivariate cumulative model and the multivariate adjacent categories model. |
License: | GPL-2 | GPL-3 [expanded from: GPL (≥ 2)] |
Imports: | Rcpp (≥ 0.12.4), statmod |
LinkingTo: | Rcpp, RcppArmadillo |
Encoding: | UTF-8 |
RoxygenNote: | 7.2.3 |
NeedsCompilation: | yes |
Packaged: | 2024-01-23 08:23:04 UTC; ge29weh |
Repository: | CRAN |
Date/Publication: | 2024-01-23 10:22:48 UTC |
Model Multivariate Ordinal Responses Including Response Styles
Description
A model for multivariate ordinal responses. The response is modelled using a mixed model approach that is also capable of the inclusion of response style effects of the respondents.
Author(s)
Gunther Schauberger
gunther.schauberger@tum.de
https://orcid.org/0000-0002-0392-1580
References
Schauberger, Gunther and Tutz, Gerhard (2021): Multivariate Ordinal Random Effects Models Including Subject and Group Specific Response Style Effects, Statistical Modelling, doi:10.1177/1471082X20978034
See Also
multordRS
ctrl.multordRS
plot.MultOrdRS
Examples
data(tenseness)
## create a small subset of the data to speed up calculations
set.seed(1860)
tenseness <- tenseness[sample(1:nrow(tenseness), 300),]
## scale all metric variables to get comparable parameter estimates
tenseness$Age <- scale(tenseness$Age)
tenseness$Income <- scale(tenseness$Income)
## two formulas, one without and one with explanatory variables (gender and age)
f.tense0 <- as.formula(paste("cbind(",paste(names(tenseness)[1:4],collapse=","),") ~ 1"))
f.tense1 <- as.formula(paste("cbind(",paste(names(tenseness)[1:4],collapse=","),") ~ Gender + Age"))
####
## Adjacent Categories Models
####
## Multivariate adjacent categories model, without response style, without explanatory variables
m.tense0 <- multordRS(f.tense0, data = tenseness, control = ctrl.multordRS(RS = FALSE, cores = 2))
m.tense0
## Multivariate adjacent categories model, with response style as a random effect,
## without explanatory variables
m.tense1 <- multordRS(f.tense0, data = tenseness)
m.tense1
## Multivariate adjacent categories model, with response style as a random effect,
## without explanatory variables for response style BUT for location
m.tense2 <- multordRS(f.tense1, data = tenseness, control = ctrl.multordRS(XforRS = FALSE))
m.tense2
## Multivariate adjacent categories model, with response style as a random effect, with
## explanatory variables for location AND response style
m.tense3 <- multordRS(f.tense1, data = tenseness)
m.tense3
plot(m.tense3)
####
## Cumulative Models
####
## Multivariate cumulative model, without response style, without explanatory variables
m.tense0.cumul <- multordRS(f.tense0, data = tenseness, control = ctrl.multordRS(RS = FALSE),
model = "cumulative")
m.tense0.cumul
## Multivariate cumulative model, with response style as a random effect,
## without explanatory variables
m.tense1.cumul <- multordRS(f.tense0, data = tenseness, model = "cumulative")
m.tense1.cumul
## Multivariate cumulative model, with response style as a random effect,
## without explanatory variables for response style BUT for location
m.tense2.cumul <- multordRS(f.tense1, data = tenseness, control = ctrl.multordRS(XforRS = FALSE),
model = "cumulative")
m.tense2.cumul
## Multivariate cumulative model, with response style as a random effect, with
## explanatory variables for location AND response style
m.tense3.cumul <- multordRS(f.tense1, data = tenseness, model = "cumulative")
m.tense3.cumul
plot(m.tense3.cumul)
################################################################
## Examples from Schauberger and Tutz (2020)
## Data from the German Longitudinal Election Study (GLES) 2017
################################################################
####
## Source: German Longitudinal Election Study 2017
## Rossteutscher et al. 2017, https://doi.org/10.4232/1.12927
####
## load GLES data
data(GLES17)
## scale data
GLES17[,7:11] <- scale(GLES17[,7:11])
## define formula
f.GLES <- as.formula(cbind(RefugeeCrisis, ClimateChange, Terrorism,
Globalization, Turkey, NuclearEnergy) ~
Age + Gender + Unemployment + EastWest + Abitur)
## fit adjacent categories model without and with response style parameters
m.GLES0 <- multordRS(f.GLES, data = GLES17, control = ctrl.multordRS(RS = FALSE, cores = 6))
m.GLES <- multordRS(f.GLES, data = GLES17, control = ctrl.multordRS(cores = 6))
m.GLES0
m.GLES
plot(m.GLES, main = "Adjacent categories model")
## fit cumulative model without and with response style parameters (takes pretty long!!!)
m.GLES20 <- multordRS(f.GLES, data = GLES17, model="cumul",
control = ctrl.multordRS(opt.method = "nlminb", cores = 6, RS = FALSE))
m.GLES2 <- multordRS(f.GLES, data = GLES17, model="cumul",
control = ctrl.multordRS(opt.method = "nlminb", cores = 6))
m.GLES20
m.GLES2
plot(m.GLES2, main = "Cumulative model")
German Longitudinal Election Study 2017 (GLES17)
Description
Data from the German Longitudinal Election Study (GLES) from 2017 (Rossteutscher et al., 2017, https://doi.org/10.4232/1.12927). The GLES is a long-term study of the German electoral process. It collects pre- and post-election data for several federal elections, the data used here originate from the pre-election study for 2017.
Format
A data frame containing data from the German Longitudinal Election Study with 2036 observations. The data contain socio-demographic information about the participants as well as their responses to items about specific political fears.
- RefugeeCrisis
How afraid are you due to the refugee crisis? (Likert scale from 1 (not afraid at all) to 7 (very afraid))
- ClimateChange
How afraid are you due to the global climate change? (Likert scale from 1 (not afraid at all) to 7 (very afraid))
- Terrorism
How afraid are you due to the international terrorism? (Likert scale from 1 (not afraid at all) to 7 (very afraid))
- Globalization
How afraid are you due to the globalization? (Likert scale from 1 (not afraid at all) to 7 (very afraid))
- Turkey
How afraid are you due to the political developments in Turkey? (Likert scale from 1 (not afraid at all) to 7 (very afraid))
- NuclearEnergy
How afraid are you due to the use of nuclear energy? (Likert scale from 1 (not afraid at all) to 7 (very afraid))
- Age
Age in years
- Gender
0: male, 1: female
- EastWest
0: West Germany, 1: East Germany
- Abitur
High School Diploma, 1: Abitur/A levels, 0: else
- Unemployment
1: currently unemployed, 0: else
Source
https://www.gesis.org/en/gles/about-gles and doi:10.4232/1.12927
References
Rossteutscher, S., Schmitt-Beck, R., Schoen, H., Wessels, B., Wolf, C., Bieber, I., Stovsand, L.-C., Dietz, M., and Scherer, P. (2017). Pre-election cross section (GLES 2017). GESIS Data Archive, Cologne, ZA6800 Data file Version 2.0.0., doi:10.4232/1.12927.
Schauberger, Gunther and Tutz, Gerhard (2021): Multivariate Ordinal Random Effects Models Including Subject and Group Specific Response Style Effects, Statistical Modelling, doi:10.1177/1471082X20978034
Examples
###############################################################
## Examples from Schauberger and Tutz (2020)
## Data from the German Longitudinal Election Study (GLES) 2017
###############################################################
####
## Source: German Longitudinal Election Study 2017
## Rossteutscher et al. 2017, https://doi.org/10.4232/1.12927
####
## load GLES data
data(GLES17)
## scale data
GLES17[,7:11] <- scale(GLES17[,7:11])
## define formula
f.GLES <- as.formula(cbind(RefugeeCrisis, ClimateChange, Terrorism,
Globalization, Turkey, NuclearEnergy) ~
Age + Gender + Unemployment + EastWest + Abitur)
## fit adjacent categories model without and with response style parameters
m.GLES0 <- multordRS(f.GLES, data = GLES17, control = ctrl.multordRS(RS = FALSE, cores = 6))
m.GLES <- multordRS(f.GLES, data = GLES17, control = ctrl.multordRS(cores = 6))
m.GLES0
m.GLES
plot(m.GLES, main = "Adjacent categories model")
## fit cumulative model without and with response style parameters (takes pretty long!!!)
m.GLES20 <- multordRS(f.GLES, data = GLES17, model="cumul",
control = ctrl.multordRS(opt.method = "nlminb", cores = 6, RS = FALSE))
m.GLES2 <- multordRS(f.GLES, data = GLES17, model="cumul",
control = ctrl.multordRS(opt.method = "nlminb", cores = 6))
m.GLES20
m.GLES2
plot(m.GLES2, main = "Cumulative model")
Control Function for multordRS
Description
Control function for multordRS, a model for multivariate ordinal responses including response styles
Usage
ctrl.multordRS(
RS = TRUE,
thresholds.acat = c("full", "shift", "minimal"),
XforRS = TRUE,
opt.method = c("L-BFGS-B", "nlminb"),
Q = 10,
cores = 5,
lambda = 0.01
)
Arguments
RS |
Logical value indicating whether response style should be modelled. |
thresholds.acat |
Type of parametrization used for thresholds: |
XforRS |
Logical value indicating whether also covariate effects on the
response style should be considered. Only relevant if |
opt.method |
Specifies optimization algorithm used by |
Q |
Number of nodes to be used (per dimension) in Gauss-Hermite-Quadrature. If |
cores |
Number of cores to be used in parallelized computation. |
lambda |
Tuning parameter for internal ridge penalty. It is supposed to be set to a small value to stabilize estimates. |
Value
Returns list of control parameters used in multordRS
.
Author(s)
Gunther Schauberger
gunther.schauberger@tum.de
https://orcid.org/0000-0002-0392-1580
References
Schauberger, Gunther and Tutz, Gerhard (2021): Multivariate Ordinal Random Effects Models Including Subject and Group Specific Response Style Effects, Statistical Modelling, doi:10.1177/1471082X20978034
See Also
multordRS
MultOrdRS-package
plot.MultOrdRS
Examples
data(tenseness)
## create a small subset of the data to speed up calculations
set.seed(1860)
tenseness <- tenseness[sample(1:nrow(tenseness), 300),]
## scale all metric variables to get comparable parameter estimates
tenseness$Age <- scale(tenseness$Age)
tenseness$Income <- scale(tenseness$Income)
## two formulas, one without and one with explanatory variables (gender and age)
f.tense0 <- as.formula(paste("cbind(",paste(names(tenseness)[1:4],collapse=","),") ~ 1"))
f.tense1 <- as.formula(paste("cbind(",paste(names(tenseness)[1:4],collapse=","),") ~ Gender + Age"))
####
## Adjacent Categories Models
####
## Multivariate adjacent categories model, without response style,
## without explanatory variables
m.tense0 <- multordRS(f.tense0, data = tenseness, control = ctrl.multordRS(RS = FALSE))
m.tense0
## Multivariate adjacent categories model, with response style as a random effect,
## without explanatory variables
m.tense1 <- multordRS(f.tense0, data = tenseness)
m.tense1
## Multivariate adjacent categories model, with response style as a random effect,
## without explanatory variables for response style BUT for location
m.tense2 <- multordRS(f.tense1, data = tenseness, control = ctrl.multordRS(XforRS = FALSE))
m.tense2
## Multivariate adjacent categories model, with response style as a random effect, with
## explanatory variables for location AND response style
m.tense3 <- multordRS(f.tense1, data = tenseness)
m.tense3
plot(m.tense3)
####
## Cumulative Models
####
## Multivariate cumulative model, without response style, without explanatory variables
m.tense0.cumul <- multordRS(f.tense0, data = tenseness,
control = ctrl.multordRS(RS = FALSE), model = "cumulative")
m.tense0.cumul
## Multivariate cumulative model, with response style as a random effect,
## without explanatory variables
m.tense1.cumul <- multordRS(f.tense0, data = tenseness, model = "cumulative")
m.tense1.cumul
## Multivariate cumulative model, with response style as a random effect,
## without explanatory variables for response style BUT for location
m.tense2.cumul <- multordRS(f.tense1, data = tenseness,
control = ctrl.multordRS(XforRS = FALSE), model = "cumulative")
m.tense2.cumul
## Multivariate cumulative model, with response style as a random effect, with
## explanatory variables for location AND response style
m.tense3.cumul <- multordRS(f.tense1, data = tenseness, model = "cumulative")
m.tense3.cumul
plot(m.tense3.cumul)
################################################################
## Examples from Schauberger and Tutz (2020) on
## Data from the German Longitudinal Election Study (GLES) 2017
#################################################################
####
## Source: German Longitudinal Election Study 2017
## Rossteutscher et al. 2017, https://doi.org/10.4232/1.12927
####
## load GLES data
data(GLES17)
## scale data
GLES17[,7:11] <- scale(GLES17[,7:11])
## define formula
f.GLES <- as.formula(cbind(RefugeeCrisis, ClimateChange, Terrorism,
Globalization, Turkey, NuclearEnergy) ~
Age + Gender + Unemployment + EastWest + Abitur)
## fit adjacent categories model without and with response style parameters
m.GLES0 <- multordRS(f.GLES, data = GLES17, control = ctrl.multordRS(RS = FALSE, cores = 6))
m.GLES <- multordRS(f.GLES, data = GLES17, control = ctrl.multordRS(cores = 6))
m.GLES0
m.GLES
plot(m.GLES, main = "Adjacent categories model")
## fit cumulative model without and with response style parameters (takes pretty long!!!)
m.GLES20 <- multordRS(f.GLES, data = GLES17, model="cumul",
control = ctrl.multordRS(opt.method = "nlminb", cores = 6, RS = FALSE))
m.GLES2 <- multordRS(f.GLES, data = GLES17, model="cumul",
control = ctrl.multordRS(opt.method = "nlminb", cores = 6))
m.GLES20
m.GLES2
plot(m.GLES2, main = "Cumulative model")
Model Multivariate Ordinal Responses Including Response Styles
Description
A model for multivariate ordinal responses. The response is modelled using a mixed model approach that is also capable of the inclusion of response style effects of the respondents.
Usage
multordRS(
formula,
data = NULL,
control = ctrl.multordRS(),
se = TRUE,
model = c("acat", "cumulative")
)
Arguments
formula |
Formula containing the (multivariate) ordinal response on the left side and the explanatory variables on the right side. |
data |
Data frame containing the ordinal responses as well as the explanatory variables from the |
control |
Control argument for |
se |
Should standard errors be calculated for the regression coefficients? Default is |
model |
Specifies, which type of model is used, either the (multivariate) adjacent categories model ( |
Value
beta.thresh |
Matrix containing all threshold parameters for the respective model. |
beta.shift |
Vector containing all shift parameters. Only relevant if |
beta.X |
Vector containing parameter estimates for the location effects of the explanatory variables. |
beta.XRS |
Vector containing parameter estimates for the response style effects of the explanatory variables. |
Sigma |
Estimate of the variance (or covariance matrix) of the random effects. The estimate is a matrix if person-specific random response style effects are considered in the model (i.e. if |
Y |
Matrix containing the explanatory variables. |
X |
Data frame containing the multivariate ordinal response, one row per obeservation, one column per response variable. |
se.thresh |
Matrix containing all standard errors of the threshold parameters for the respective model. |
se.shift |
Vector containing all standard errors of the shift parameters. Only relevant if |
se.X |
Vector containing standard errors of the parameter estimates for the location effects of the explanatory variables. |
se.XRS |
Vector containing standard errors of the parameter estimates for the response style effects of the explanatory variables. |
coef.vec |
Complete vector of all parameter estimates (for internal use). |
se.vec |
Complete vector of all standard errors (for internal use). |
design.values |
Some values of the design matrix (for internal use). |
loglik |
(Marginal) Log Likelihood |
call |
Function call |
df |
Degrees of freedom |
control |
Control argument from function call |
Author(s)
Gunther Schauberger
gunther.schauberger@tum.de
https://orcid.org/0000-0002-0392-1580
References
Schauberger, Gunther and Tutz, Gerhard (2021): Multivariate Ordinal Random Effects Models Including Subject and Group Specific Response Style Effects, Statistical Modelling, doi:10.1177/1471082X20978034
See Also
ctrl.multordRS
MultOrdRS-package
plot.MultOrdRS
Examples
data(tenseness)
## create a small subset of the data to speed up calculations
set.seed(1860)
tenseness <- tenseness[sample(1:nrow(tenseness), 300),]
## scale all metric variables to get comparable parameter estimates
tenseness$Age <- scale(tenseness$Age)
tenseness$Income <- scale(tenseness$Income)
## two formulas, one without and one with explanatory variables (gender and age)
f.tense0 <- as.formula(paste("cbind(",paste(names(tenseness)[1:4],collapse=","),") ~ 1"))
f.tense1 <- as.formula(paste("cbind(",paste(names(tenseness)[1:4],collapse=","),") ~ Gender + Age"))
####
## Adjacent Categories Models
####
## Multivariate adjacent categories model, without response style, without explanatory variables
m.tense0 <- multordRS(f.tense0, data = tenseness, control = ctrl.multordRS(RS = FALSE, cores = 2))
m.tense0
## Multivariate adjacent categories model, with response style as a random effect,
## without explanatory variables
m.tense1 <- multordRS(f.tense0, data = tenseness)
m.tense1
## Multivariate adjacent categories model, with response style as a random effect,
## without explanatory variables for response style BUT for location
m.tense2 <- multordRS(f.tense1, data = tenseness, control = ctrl.multordRS(XforRS = FALSE))
m.tense2
## Multivariate adjacent categories model, with response style as a random effect, with
## explanatory variables for location AND response style
m.tense3 <- multordRS(f.tense1, data = tenseness)
m.tense3
plot(m.tense3)
####
## Cumulative Models
####
## Multivariate cumulative model, without response style, without explanatory variables
m.tense0.cumul <- multordRS(f.tense0, data = tenseness, control = ctrl.multordRS(RS = FALSE),
model = "cumulative")
m.tense0.cumul
## Multivariate cumulative model, with response style as a random effect,
## without explanatory variables
m.tense1.cumul <- multordRS(f.tense0, data = tenseness, model = "cumulative")
m.tense1.cumul
## Multivariate cumulative model, with response style as a random effect,
## without explanatory variables for response style BUT for location
m.tense2.cumul <- multordRS(f.tense1, data = tenseness, control = ctrl.multordRS(XforRS = FALSE),
model = "cumulative")
m.tense2.cumul
## Multivariate cumulative model, with response style as a random effect, with
## explanatory variables for location AND response style
m.tense3.cumul <- multordRS(f.tense1, data = tenseness, model = "cumulative")
m.tense3.cumul
plot(m.tense3.cumul)
################################################################
## Examples from Schauberger and Tutz (2020)
## Data from the German Longitudinal Election Study (GLES) 2017
#################################################################
####
## Source: German Longitudinal Election Study 2017
## Rossteutscher et al. 2017, https://doi.org/10.4232/1.12927
####
## load GLES data
data(GLES17)
## scale data
GLES17[,7:11] <- scale(GLES17[,7:11])
## define formula
f.GLES <- as.formula(cbind(RefugeeCrisis, ClimateChange, Terrorism,
Globalization, Turkey, NuclearEnergy) ~
Age + Gender + Unemployment + EastWest + Abitur)
## fit adjacent categories model without and with response style parameters
m.GLES0 <- multordRS(f.GLES, data = GLES17, control = ctrl.multordRS(RS = FALSE, cores = 6))
m.GLES <- multordRS(f.GLES, data = GLES17, control = ctrl.multordRS(cores = 6))
m.GLES0
m.GLES
plot(m.GLES, main = "Adjacent categories model")
## fit cumulative model without and with response style parameters (takes pretty long!!!)
m.GLES20 <- multordRS(f.GLES, data = GLES17, model="cumul",
control = ctrl.multordRS(opt.method = "nlminb", cores = 6, RS = FALSE))
m.GLES2 <- multordRS(f.GLES, data = GLES17, model="cumul",
control = ctrl.multordRS(opt.method = "nlminb", cores = 6))
m.GLES20
m.GLES2
plot(m.GLES2, main = "Cumulative model")
Plot function for MultOrdRS
Description
Plot function for a MultOrdRS
object. Plots show coefficients of the explanatory variables, both with repect to location and response styles.
The coefficient pairs are displayed as stars, where the rays represent (1-alpha) confidence intervals.
Usage
## S3 method for class 'MultOrdRS'
plot(x, alpha = 0.05, CIfactor = 0.9,
xlab = expression(exp(gamma)), ylab = expression(exp(alpha)),
xlim = range(c(1,betaX.KI)), ylim = range(c(1,betaXRS.KI)), ...)
Arguments
x |
|
alpha |
Specifies the confidence level 1-alpha of the confidence interval. |
CIfactor |
Argument that helps to control the appearance (the width) of the stars that represent the confidence intervals of both parameters (location and response style) corresponding to one covariate. |
xlab |
Label for x-axis |
ylab |
Label for y-axis |
xlim |
Limits for x-axis |
ylim |
Limits for y-axis |
... |
Further plot arguments. |
Value
No return value, called for side effects
Author(s)
Gunther Schauberger
gunther.schauberger@tum.de
https://orcid.org/0000-0002-0392-1580
References
Schauberger, Gunther and Tutz, Gerhard (2021): Multivariate Ordinal Random Effects Models Including Subject and Group Specific Response Style Effects, Statistical Modelling, doi:10.1177/1471082X20978034
See Also
Examples
data(tenseness)
## create a small subset of the data to speed up calculations
set.seed(1860)
tenseness <- tenseness[sample(1:nrow(tenseness), 300),]
## scale all metric variables to get comparable parameter estimates
tenseness$Age <- scale(tenseness$Age)
tenseness$Income <- scale(tenseness$Income)
## two formulas, one without and one with explanatory variables (gender and age)
f.tense0 <- as.formula(paste("cbind(",paste(names(tenseness)[1:4],collapse=","),") ~ 1"))
f.tense1 <- as.formula(paste("cbind(",paste(names(tenseness)[1:4],collapse=","),") ~ Gender + Age"))
####
## Adjacent Categories Models
####
## Multivariate adjacent categories model, without response style, without explanatory variables
m.tense0 <- multordRS(f.tense0, data = tenseness, control = ctrl.multordRS(RS = FALSE))
m.tense0
## Multivariate adjacent categories model, with response style as a random effect,
## without explanatory variables
m.tense1 <- multordRS(f.tense0, data = tenseness)
m.tense1
## Multivariate adjacent categories model, with response style as a random effect,
## without explanatory variables for response style BUT for location
m.tense2 <- multordRS(f.tense1, data = tenseness, control = ctrl.multordRS(XforRS = FALSE))
m.tense2
## Multivariate adjacent categories model, with response style as a random effect, with
## explanatory variables for location AND response style
m.tense3 <- multordRS(f.tense1, data = tenseness)
m.tense3
plot(m.tense3)
####
## Cumulative Models
####
## Multivariate cumulative model, without response style, without explanatory variables
m.tense0.cumul <- multordRS(f.tense0, data = tenseness,
control = ctrl.multordRS(RS = FALSE), model = "cumulative")
m.tense0.cumul
## Multivariate cumulative model, with response style as a random effect,
## without explanatory variables
m.tense1.cumul <- multordRS(f.tense0, data = tenseness, model = "cumulative")
m.tense1.cumul
## Multivariate cumulative model, with response style as a random effect,
## without explanatory variables for response style BUT for location
m.tense2.cumul <- multordRS(f.tense1, data = tenseness,
control = ctrl.multordRS(XforRS = FALSE), model = "cumulative")
m.tense2.cumul
## Multivariate cumulative model, with response style as a random effect, with
## explanatory variables for location AND response style
m.tense3.cumul <- multordRS(f.tense1, data = tenseness, model = "cumulative")
m.tense3.cumul
plot(m.tense3.cumul)
#################################################################
## Examples from Schauberger and Tutz (2020)
## Data from the German Longitudinal Election Study (GLES) 2017
#################################################################
####
## Source: German Longitudinal Election Study 2017
## Rossteutscher et al. 2017, https://doi.org/10.4232/1.12927
####
## load GLES data
data(GLES17)
## scale data
GLES17[,7:11] <- scale(GLES17[,7:11])
## define formula
f.GLES <- as.formula(cbind(RefugeeCrisis, ClimateChange, Terrorism,
Globalization, Turkey, NuclearEnergy) ~
Age + Gender + Unemployment + EastWest + Abitur)
## fit adjacent categories model without and with response style parameters
m.GLES0 <- multordRS(f.GLES, data = GLES17, control = ctrl.multordRS(RS = FALSE, cores = 6))
m.GLES <- multordRS(f.GLES, data = GLES17, control = ctrl.multordRS(cores = 6))
m.GLES0
m.GLES
plot(m.GLES, main = "Adjacent categories model")
## fit cumulative model without and with response style parameters (takes pretty long!!!)
m.GLES20 <- multordRS(f.GLES, data = GLES17, model="cumul",
control = ctrl.multordRS(opt.method = "nlminb", cores = 6, RS = FALSE))
m.GLES2 <- multordRS(f.GLES, data = GLES17, model="cumul",
control = ctrl.multordRS(opt.method = "nlminb", cores = 6))
m.GLES20
m.GLES2
plot(m.GLES2, main = "Cumulative model")
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 1847 participants of the standardization sample of the Freiburg Complaint Checklist. Additionally, several person characteristics are available.
Format
A data frame containing data from the Freiburg Complaint Checklist with 1847 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?
- Gender
Gender of the participant
- Household
Does participant live alone in a houshold or together with others?
- WestEast
is the participant from East Germany (former GDR) or West Germany?
- Age
Age in 15 categories, treated as continuous variable
- Abitur
Does the participant have Abitur (a-levels)?
- Income
Income in 11 categories, treated as continuous variable
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.
Examples
data(tenseness)
## create a small subset of the data to speed up calculations
set.seed(1860)
tenseness <- tenseness[sample(1:nrow(tenseness), 300),]
## scale all metric variables to get comparable parameter estimates
tenseness$Age <- scale(tenseness$Age)
tenseness$Income <- scale(tenseness$Income)
## two formulas, one without and one with explanatory variables (gender and age)
f.tense0 <- as.formula(paste("cbind(",paste(names(tenseness)[1:4],collapse=","),") ~ 1"))
f.tense1 <- as.formula(paste("cbind(",paste(names(tenseness)[1:4],collapse=","),") ~ Gender + Age"))
####
## Adjacent Categories Models
####
## Multivariate adjacent categories model, without response style, without explanatory variables
m.tense0 <- multordRS(f.tense0, data = tenseness, control = ctrl.multordRS(RS = FALSE))
m.tense0
## Multivariate adjacent categories model, with response style as a random effect,
## without explanatory variables
m.tense1 <- multordRS(f.tense0, data = tenseness)
m.tense1
## Multivariate adjacent categories model, with response style as a random effect,
## without explanatory variables for response style BUT for location
m.tense2 <- multordRS(f.tense1, data = tenseness, control = ctrl.multordRS(XforRS = FALSE))
m.tense2
## Multivariate adjacent categories model, with response style as a random effect, with
## explanatory variables for location AND response style
m.tense3 <- multordRS(f.tense1, data = tenseness)
m.tense3
plot(m.tense3)
####
## Cumulative Models
####
## Multivariate cumulative model, without response style, without explanatory variables
m.tense0.cumul <- multordRS(f.tense0, data = tenseness, control =
ctrl.multordRS(RS = FALSE), model = "cumulative")
m.tense0.cumul
## Multivariate cumulative model, with response style as a random effect,
## without explanatory variables
m.tense1.cumul <- multordRS(f.tense0, data = tenseness, model = "cumulative")
m.tense1.cumul
## Multivariate cumulative model, with response style as a random effect,
## without explanatory variables for response style BUT for location
m.tense2.cumul <- multordRS(f.tense1, data = tenseness,
control = ctrl.multordRS(XforRS = FALSE), model = "cumulative")
m.tense2.cumul
## Multivariate cumulative model, with response style as a random effect,
## with explanatory variables
## for location AND response style
m.tense3.cumul <- multordRS(f.tense1, data = tenseness, model = "cumulative")
m.tense3.cumul
plot(m.tense3.cumul)