Package 'ordDisp'

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

Help Index


Separating Location and Dispersion in Ordinal Regression Models

Description

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).

Usage

ordDisp(formula, data, family = c("cumulative", "acat"),
  scaling = TRUE, middle = TRUE, m = NULL, n_bs = 6,
  reverse = FALSE, ...)

Arguments

formula

Object of class formula: a symbolic description of the model to be fitted. See details.

data

Data.frame of class data.frame containing the variables of the model.

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 "cumulative" and "acat". See details.

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 middle=FALSE.

n_bs

Number of inner B-spline basis functions for smooth components (see details).

reverse

Argument of the family function passed to vglm.

...

Further arguments passed to or from other methods

Details

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

    P(yr)/P(y>r)=etarP(y\leq r)/P(y>r)=eta_r

  • "acat" to estimate a adjacent-categories model of the form

    P(y=r+1)/P(y=r)=etarP(y=r+1)/P(y=r)=eta_r

Value

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 ordDisp.

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.

Author(s)

Moritz Berger <[email protected]>
https://www.imbie.uni-bonn.de/personen/dr-moritz-berger/

References

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.

See Also

summaryvglm, predictvglm, plotordDisp

Examples

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)

Visualization of Estimated Effects

Description

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 (expα,expβ(exp{\alpha},exp{\beta}. It is optional to include pointwise 95% confidence intervals represented by stars, where the horizontal and vertical length correspond to the confidence intervals of expαexp{\alpha} (dispersion or response-style effect) and expβexp{\beta} (location or content-related effect). In case of smooth effects, the function returns two plots of the fitted (non-linear) functions f(β)f(\beta) and f(α)f(\alpha).

Usage

plotordDisp(x, names, colorvec, reference = NULL, labels = NULL,
  cex = 1, KI = FALSE, KIfactor = 10/11, title = NULL, ...)

Arguments

x

Object of class ordDisp

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 (α,β)=(0,0)(\alpha,\beta)=(0,0) (for categorical covariates)

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 KI=TRUE)

title

Optional title that is added to the plot

...

Further arguments passed to or from other methods

Author(s)

Moritz Berger <[email protected]>
https://www.imbie.uni-bonn.de/personen/dr-moritz-berger/

References

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.

See Also

ordDisp

Examples

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"))

Example Retinopathy

Description

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.

Usage

data(reti)

Format

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

References

Bender and Grouven (1998): Using binary logistic regression models for ordinal data with nonproportional odds, J. Clin. Epidemiol., 51, 809-816.

Examples

data(reti)
table(reti$RET)