Title: | Separating Location and Dispersion in Ordinal Regression Models |
---|---|
Description: | Estimate location-shift models or rating-scale models accounting for response styles (RSRS) for the regression analysis of ordinal responses. |
Authors: | Moritz Berger |
Maintainer: | Moritz Berger <[email protected]> |
License: | GPL-2 |
Version: | 2.1.1 |
Built: | 2025-02-15 05:09:49 UTC |
Source: | https://github.com/cran/ordDisp |
A function to estimate the location-shift model or rating-scale model accounting for response styles (RSRS) for the regression analysis of ordinal responses. The model allows to account for differing variability in subgroups of the population. The model explicitely links varying disperion (or response behaviour) to explanatory variables (metric, binary, ordinal and/or nominal). The basic models are described in Tutz and Berger (2016) and Tutz and Berger (2017).
ordDisp(formula, data, family = c("cumulative", "acat"), scaling = TRUE, middle = TRUE, m = NULL, n_bs = 6, reverse = FALSE, ...)
ordDisp(formula, data, family = c("cumulative", "acat"), scaling = TRUE, middle = TRUE, m = NULL, n_bs = 6, reverse = FALSE, ...)
formula |
Object of class |
data |
Data.frame of class |
family |
Type of link function that is used to link the mean responses to the linear predictors of the model;
ordDisp currently allows only one out of |
scaling |
If true, the thresholds of the location-shift model are shifting by using scale values for the widening of the intervals between two thresholds. |
middle |
If true, the model expects a symmetric response of the form 'strongly disagree','moderatly disagree',..., 'moderatly agree','strongly agree'. |
m |
Middle category of the (non-symmetric) response, chosen for the model. Only relevant, if |
n_bs |
Number of inner B-spline basis functions for smooth components (see details). |
reverse |
Argument of the family function passed to |
... |
Further arguments passed to or from other methods |
The formula has to have the form response ~ x-variables|z-variables
, where response
is the name of
the ordinal response variable, x-variables
are the terms that specify the location (or content-related) effects
of the model and z-variables
are the terms that specify the dispersion (or response-style) effects.
If all the variables are entered in both parts of the model, the right hand side of the formula can, for example,
have the form x1+...+xp|x1+...+xp
. If the second part is omitted, a simple model without dispersion
(or response-style) effects is fitted.
The function allows for smooth (non-linear) effects in the x-variables and/or the z-variables. Smooth effects are specified
by entering s(x) and/or s(z) into the formula. The functions are fitted using n_bs
B-spline basis functions.
Function ordDisp
internally calls vglm
from package VGAM
. Argument family
is passed to vglm
.
Currently two link functions are implemented
"cumulative"
to estimate a cumulative model of the form
"acat"
to estimate a adjacent-categories model of the form
Object of class ordDisp
which inherits from vglm
. The object comprises all the slots of an
"vglm"
-object and in addition the following components:
outercall |
The matched call of |
X |
Design matrix of x-variables. |
Z |
Design matrix of z-variables. |
All the methods implemented for objects of class vglm
, like print
, summary
, predict
and plot
can be applied.
Moritz Berger <[email protected]>
https://www.imbie.uni-bonn.de/personen/dr-moritz-berger/
Tutz, Gerhard and Berger, Moritz (2016): Response Styles in Rating Scales - Simultaneous Modelling of Content-Related Effects and the Tendency to Middle or Extreme Categories, Journal of Educational and Behavioral Statistics 41(3), 239-268.
Tutz, Gerhard and Berger, Moritz (2017): Seperating Location and Dispersion in Ordinal Regression Models, Econometrics and Statistics 2, 131-148.
summaryvglm
, predictvglm
, plotordDisp
data(reti) mod <- ordDisp(RET~SM+DIAB+GH+BP|SM+DIAB,data=reti,family="cumulative") summary(mod) mod2 <- ordDisp(RET~SM+s(DIAB)+GH+BP|SM+DIAB+GH+BP, data=reti, family="cumulative", n_bs=4, scaling=FALSE) summary(mod2)
data(reti) mod <- ordDisp(RET~SM+DIAB+GH+BP|SM+DIAB,data=reti,family="cumulative") summary(mod) mod2 <- ordDisp(RET~SM+s(DIAB)+GH+BP|SM+DIAB+GH+BP, data=reti, family="cumulative", n_bs=4, scaling=FALSE) summary(mod2)
A function to visualize the estimated effects of the location-shift model or rating-scale model accounting for response styles
(RSRS) obtained by ordDisp
. In case of linear effects, the function returns a two-dimensional plot of the tupel .
It is optional to include pointwise 95% confidence intervals represented by stars, where the horizontal and vertical
length correspond to the confidence intervals of
(dispersion or response-style effect) and
(location or content-related effect). In case of smooth effects, the function returns two plots of the fitted (non-linear) functions
and
.
plotordDisp(x, names, colorvec, reference = NULL, labels = NULL, cex = 1, KI = FALSE, KIfactor = 10/11, title = NULL, ...)
plotordDisp(x, names, colorvec, reference = NULL, labels = NULL, cex = 1, KI = FALSE, KIfactor = 10/11, title = NULL, ...)
x |
Object of class |
names |
Names of the variables that shall be plotted |
colorvec |
Vector of colors that are used for plotting (same length as names) |
reference |
Optional name of reference with estimate |
labels |
Optional names that are used as labels in the plot (same length as names) |
cex |
Global argument to set the size of all the labels in the plot |
KI |
If true, pointwise 95% confidence intervals are included in the plot |
KIfactor |
Ratio that is used to plot the stars that represent confidence intervals (only if |
title |
Optional title that is added to the plot |
... |
Further arguments passed to or from other methods |
Moritz Berger <[email protected]>
https://www.imbie.uni-bonn.de/personen/dr-moritz-berger/
Tutz, Gerhard and Berger, Moritz (2016): Response Styles in Rating Scales - Simultaneous Modelling of Content-Related Effects and the Tendency to Middle or Extreme Categories, Journal of Educational and Behavioral Statistics 41(3), 239-268.
Tutz, Gerhard and Berger, Moritz (2017): Seperating Location and Dispersion in Ordinal Regression Models, Econometrics and Statistics 2, 131-148.
data(reti) mod <- ordDisp(RET~SM+DIAB+GH+BP|SM+DIAB,data=reti,family="cumulative") plot(mod,names=c("SM","DIAB"),colorvec=c(1,2)) plotvglm(mod) mod2 <- ordDisp(RET~SM+s(DIAB)+GH+BP|SM+DIAB+GH+BP, data=reti, family="cumulative", n_bs=4, scaling=FALSE) plot(mod2, names=c("DIAB"))
data(reti) mod <- ordDisp(RET~SM+DIAB+GH+BP|SM+DIAB,data=reti,family="cumulative") plot(mod,names=c("SM","DIAB"),colorvec=c(1,2)) plotvglm(mod) mod2 <- ordDisp(RET~SM+s(DIAB)+GH+BP|SM+DIAB+GH+BP, data=reti, family="cumulative", n_bs=4, scaling=FALSE) plot(mod2, names=c("DIAB"))
The data set contains information about persons with retinopathy. In the 6-year followup study on diabetes and retinopathy status the interesting question is how the retinopathy status is associated wie several risk factors.
data(reti)
data(reti)
A data frame containing 613 observations on 5 variables:
RET
retinopathy status (1:no retinopathy, 2:nonproliferative retinopathy, 3:advanced retinopathy or
blind)
SM
smoker (1:yes, 0:no)
DIAB
diabetes duration in years
GH
glycosylated hemoglobin measured in percent
BP
diastolic blood pressure in mmHg
Bender and Grouven (1998): Using binary logistic regression models for ordinal data with nonproportional odds, J. Clin. Epidemiol., 51, 809-816.
data(reti) table(reti$RET)
data(reti) table(reti$RET)