






























Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!































3 1 Department of Psychology, University of Münster, Germany 4 2 Department of Psychology, Columbia University, USA
5 Abstract
Ordinal variables, while extremely common in Psychology, are almost exclu- sively analysed with statistical models that falsely assume them to be metric. This practice can lead to distorted effect size estimates, inflated error rates, and other problems. We argue for the application of ordinal models that make appropriate assumptions about the variables under study. In this tutorial article, we first explain the three major ordinal model classes; the cumulative, sequential and adjacent category models. We then show how to fit ordinal models in a fully Bayesian framework with the R package brms, using data sets on stem cell opinions and marriage time courses. Appendices provide detailed mathematical derivations of the models and a discussion of censored ordinal models. Ordinal models provide better theoretical interpretation and numerical inference from ordinal data, and we recommend their widespread adoption in Psychology.
Keywords: ordinal models, Likert items, brms, R
6
7 1 Introduction
8 Whenever a variableās categories have a natural order, researchers speak of an ordinal 9 variable (Stevens, 1946). For example, peoplesā opinions are often probed with items 10 where respondents choose one of the following response options: āCompletely disagreeā, 11 āModerately disagreeā, āModerately agreeā, or āCompletely agreeā. Such ordinal data are 12 ubiquitous in Psychology. Although it is widely recognized that such ordinal data are not 13 metric , it is commonplace to analyze them with methods that assume metric responses. 14 However, this practice may lead to serious errors in inference (Liddell & Kruschke, 2017).
Correspondence concerning this article should be addressed to Paul-Christian Bürkner, Department of Psychology, University of Münster, Fliednerstrasse 21, 48149 Münster, Germany. E-mail: paul.buerkner@ gmail.com
15 This tutorial article provides a practical and straightforward solution to the perennial issue of 16 analyzing ordinal variables with the false assumption of metric data: Flexible and easy-to-use 17 Bayesian ordinal regression models implemented in the R statistical computing environment.
18 What, specifically, is wrong with analysing ordinal data as if they were metric? This 19 issue was examined in detail by Liddell and Kruschke (2017), whose arguments we summarize 20 here. First, analysing ordinal data with statistical models that assume metric variables, 21 such as t -tests and ANOVA, can lead to low correct detection rates, distorted effect size 22 estimates, inflated false alarm (type-I-error) rates, and even inversions of differences between 23 groups. There are three main reasons for these problems. Most importantly, the response 24 categories of an ordinal variable may not be equidistantāan assumption that is required in 25 statistical models of metric responsesābut instead the psychological distance between a 26 pair of response options may not be the same for all pairs of response options. For example, 27 the difference between āCompletely disagreeā and āModerately disagreeā may be much 28 smaller in a survey respondentās mind than the difference between āModerately disagreeā 29 and āModerately agreeā.
30 Second, the distribution of the ordinal responses may be non-normal, in particular if 31 very low or high values are frequently chosen. Third, variances of the unobserved variables 32 that underlie the observed ordinal variables may differ between groups, conditions, time- 33 points, etc. Such unequal variances cannot be accounted forāor even detected, in some 34 casesāwith the ordinal-as-metric approach. Although widely known, these potential pitfalls 35 are ignored whenever a metric model is applied to ordinal data. One common way to address 36 them has been to take averages over several Likert-items, and hope that this averaging 37 makes the problems go away. Unfortunately, that is not the case. Because metric models 38 fail to take into account, or sometimes even detect, these issues, we recommend adopting 39 ordinal models instead: āOften the only method to determine potential problems in an 40 ordinal-as-metric approach is to apply an ordinal model, in which case the results of the 41 ordinal analysis ought to be utilized regardlessā (Liddell & Kruschke, 2017, p. 37).
42 Historically, appropriate methods for analysing ordinal data were limited, although 43 simple analyses, such as comparing two groups, could be performed with non-parametric 44 approaches (Gibbons & Chakraborti, 2011). For more general analysesāregression-like 45 methods, in particularāthere were few alternatives to incorrectly treating ordinal data as 46 either metric or nominal. However, using a metric or nominal model with ordinal data 47 leads to over- or under-estimating (respectively) the information provided by the data. 48 Fortunately, recent advances in statistics and statistical software have provided many options 49 for approriate models of ordinal response variables. These methods are often summarized 50 under the term ordinal regression models. Nevertheless, application of these methods remains 51 limited, while the use of less appropriate metric models is widespread (Liddell & Kruschke, 52 2017).
53 Several reasons may underlie the persistence with metric models for ordinal data: 54 Researchers might not be aware of more appropriate methods, or they may hesitate to use 55 them because of the perceived complexity in applying or interpreting them. Moreover, since 56 closely related (or even the same) ordinal models are referred to with different names in 57 different contexts, it may be difficult for researchers to decide which model is most relevant
Table 1 Frequencies of opinion ratings about funding stem cell research 1 2 3 4 fundamentalist 40 54 119 55 moderate 25 41 135 71 liberal 23 31 113 122
95 The CM assumes that the observed ordinal variable Y , the opinion rating, originates 96 from the categorization of a latent (not observable) continuous variable Y Ė. In this example, 97 Y^ Ė is the latent opinion about funding stem cell research. To model this categorization 98 process, the CM assumes that there are K thresholds Ļk which partition Y Ė into K + 1 99 observable, ordered categories of Y. In this example, there are K + 1 = 4 response categories, 100 and therefore K = 3 thresholds. If we assume Y Ė to have a certain distribution (e.g., a normal 101 distribution) with cumulative distribution function F , we can write down the probability of 102 Y being equal to category k via
Pr( Y = k ) = F ( Ļk ) ā F ( Ļk ā 1 ). (1)
103 A conceptual illustration of this idea is shown in the top panel of Figure 1. To make this more 104 concrete, suppose we are interested in the probability of category k = 2 (āprobably not fundā) 105 and have Ļ 1 = ā 1 as well as Ļ 2 = 1. Further, we assume Y Ė to be normally distributed with 106 standard deviation fixed to one and call the corresponding cumulative normal distribution 107 function Φ (see Figure 4 in Appendix A for a visualization and comparison to other common 108 functions). Then, we compute
Pr( Y = 2) = Φ( Ļ 2 ) ā Φ( Ļ 1 ) = Φ(1) ā Φ(ā1) = 0_._ 84 ā 0_._ 16 = 0_._ 68_._ (2)
109 However, the above equation does not yet describe a regression model, because there 110 are no predictor variables. We therefore formulate a linear regression for Y Ė with predictor 111 term Ī· = b 1 x 1 + b 2 x 2 + ... , so that Y Ė = Ī· + ε where ε describes the error term of the regression. 112 Consequently, Y Ė is split into two parts. The first one ( Ī· ) represents variation in Y Ė that 113 can be explained by the predictors, the second one ( ε ) represents variation that remains 114 unexplained. Note that there is no intercept in the predictor term, because the thresholds 115 Ļk replace the modelās intercept as both are not identified at the same time. Thus, the CM 116 models the probabilities of Y being equal to category k given the linear predictor Ī· via
Pr( Y = k | Ī· ) = F ( Ļk ā Ī· ) ā F ( Ļk ā 1 ā Ī· ). (3)
117 We provide a more detailed description and derivation of the model in Appendix A.
118 The categorization interpretation is natural for many Likert-item data sets, where 119 ordered verbal (or numerical) labels are used to get discrete responses about a possibly 120 continuous psychological variable. Due to the widespread use of Likert-items in Psychology, 121 the CM is possibly the most important ordinal model class for psychological research. It
Y = 1 Y = 2 Y = 3 Y = 4
Y = 1 Y > 1 Y = 2 Y > 2 Y = 3 Y > 3
Y = 1 Y = 2 Y = 2 Y = 3 Y = 3 Y = 4
Figure 1. Assumptions of the ordinal model classes. The area under the curve in each bin represents the probability of the corresponding event given the set of possible events for this latent variable. More details are provided in Section 2 and Appendix A.
Table 2 Overview of marriage data from the NSFG 2013-2015 survey. ID together age years divorced 1 yes 19 9 TRUE 2 yes 22 9 FALSE 3 yes 20 5 FALSE 4 yes 22 2 FALSE 5 yes 25 6 FALSE 6 yes 30 1 FALSE 7 yes 32 9 FALSE 8 no 24 14 TRUE 9 no 37 1 TRUE 10 yes 18 13 TRUE Note. In the main analysis, only data of divorced women were used.
155 example, a couple can divorce in the 7th year only if they havenāt already divorced in their 156 first six years of marriage: Duration of marriage in yearsāthe ordinal dependent variable Y 157 in the current exampleācan be thought of as resulting from a sequential process.
158 The SM assumes that for every category k āyear of marriage in our exampleāthere 159 is a latent continuous variable Y Ė k that determines the transition between the k th and the 160 k + 1th category. In the marriage example, Y Ė k represents all the factors contributing to 161 the probability of a coupleās marriage continuing beyond a given year k. Informally, we 162 could call Y Ė k āmarriage qualityā, in the ongoing example. The categories are separated by 163 thresholds Ļk āperhaps thought of as the combination of all factors working against the 164 marriage continuing beyond year k in our example. If Y Ė k is greater than the threshold Ļk , 165 the sequential processāe.g. marriageācontinues; otherwise it stops at category k. The SM 166 is illustrated in the middle panel of Figure 1.
167 Since the thresholds Ļk refer to different latent variables, they donāt need to be ordered. 168 That is, we may as well have Ļk +1 < Ļk. Similar to what we did in the derivation of the CM, 169 we need to assume a certain distribution for Y Ė k (e.g., a normal distribution) with cumulative 170 distribution function F. Letās suppose, we want to model the probability of divorce in the 171 third year. This means that divorce did not happen in the first year ( Y Ė 1 > Ļ 1 ), it did not 172 happen in the second year ( Y Ė 2 > Ļ 2 ), but that it happened in the third year ( Y Ė 3 ā¤ Ļ 3 ). We 173 can write this as follows:
P ( Y = 3) = P ( Y Ė 1 > Ļ 1 ) P ( Y Ė 2 > Ļ 2 ) P ( Y Ė 3 ā¤ Ļ 3 ) = (1 ā P ( Y Ė 1 ā¤ Ļ 1 )) (1 ā P ( Y Ė 2 ā¤ Ļ 2 )) P ( Y Ė 3 ā¤ Ļ 3 ) (6)
174 If we further assume Y 1 , Y 2 , and Y 3 to be standard normally distributed and set,
175 just for illustration purposes, Ļ 1 = 0, Ļ 2 = ā 1 and Ļ 3 = 1 we can explicitely compute the 176 probability of divorce in the third year:
P ( Y = 3) = (1 ā Φ( Ļ 1 )) (1 ā Φ( Ļ 2 )) Φ( Ļ 3 ) = (1 ā Φ(0)) (1 ā Φ(ā1)) Φ(1) = 0_._ 35 (7)
177 To make the SM an actual regression model, we set up a linear regression for each 178 latent variable via Y Ė k = Ī· + εk with a category specific error term εk. By default, all Y Ė k share 179 the same linear predictor Ī· , such that the effect of any potential predictor is constant across 180 k. (Say, age at marriage is related to Y Ė k identically for years k = 3 and k = 9.) This implies 181 the following probability for the category k , or duration of marriage, under the sequential 182 model:
Pr( Y = k | Ī· ) = F ( Ļk ā Ī· )
k āā 1
j =
(1 ā F ( Ļj ā Ī· )). (8)
183 In words, the probability that Y falls in category k is equal to the probability that it 184 did not fall in one of the former categories 1 to k ā 1 , andāwhen it comes to the decision 185 whether to stop at k or continue beyond itāthe process stopped. In the current example, 186 we will use the survey respondentsā age at marriage and whether the couple was already 187 living together before marriage as predictors of marriage duration. We can think of the 188 years of marriage as a sequential process: Each year, the marriage may continue or end by 189 divorce, but the latter can only happen if it did not happen before. The years of marriage 190 until divorce is our response variable Y , whereas age at marriage and whether the couple 191 was already living together before marriage are our predictor variables, which we denote 192 as x 1 and x 2 , respectively. As the latter predictor is categorical, it will be dummy coded 193 for our analysis with x 2 = 1 if the couple was already living together and x 2 = 0 otherwise. 194 This implies the following linear regression for the latent variables Y Ė k :
Y^ Ė k = b 1 x 1 + b 2 x 2 + εk (9)
195 We assume an extreme-value distribution for Y Ė k ( F = EV), because it is the most 196 common choice in discrete time-to-event / survival models. This function is graphically 197 compared to other alternatives in Figure 4 in Appendix A. Together, this implies that the 198 probability of a marriage ending in the k th year can be computed as follows:
Pr( Y = k ) = EV ( Ļk ā ( b 1 x 1 + b 2 x 2 ))
k āā 1
j =
(1 ā EV ( Ļj ā ( b 1 x 1 + b 2 x 2 ))). (10)
199 For the current data set, the last marriage was divorced after 27 years and so we 200 have 26 thresholds ( Ļ 1 to Ļ 26 ) to estimate in addition to the two regression coefficients b 1 201 and b 2. In Section 3.2, we will learn how to fit this model in the R programming language 202 environment.
Box 1. Overview of ordinal models and brms syntax.
Consider an observed ordinal response variable Y , and a predictor X. The three model classes can be summarized as follows:
232 2.4.1 Category-specific effects. In all of the ordinal models thusfar, all predic- 233 tors are by default assumed to have the same effect on all response categories, which may 234 not always be an appropriate assumption. It is often possible that a predictor has different 235 impacts for different response categories of Y. For example, religious belief may have little 236 relation to whether people endorse a ādefinitely not fundā (1) over a āprobably not fundā 237 (2) opinion about stem cell research, but strongly predict whether āprobably fundā (3) is 238 prefered over ādefinitely fundā (4). In such a case, one can model predictors as having 239 category specific effects so that not one but K coefficients are estimated for this predictor. 240 Doing so is unproblematic in the SM and ACM, but may lead to negative probabilities in 241 the CM and thus problems in the model fitting (see Appendix A). We will come back to 242 this issue below.
243 2.4.2 Unequal variances. Another generalization of the above models concerns 244 the response function F. Especially in the context of CM, F is usually assumed to be 245 a standard normal distribution, that is to have a variance of v = 1 for reasons of model
246 identification. Freely varying the variance v is not possible in ordinal models if all the 247 thresholds Ļ are allowed to vary as well. However, it is possible that v varies as a function of 248 group, condition, time, or any other predictor variable provided that the baseline variance is 249 fixed to some value. In other words, Y Ė may have unequal variances across groups, conditions, 250 etc. Ignoring this possibility can lead to problems such as inflated error rates and distorted 251 effect sizes (Liddell & Kruschke, 2017). Fortunately, unequal variances are easily incorporated 252 in the ordinal models, as we will show below.
253 3 Fitting ordinal models in R
254 Although there are a number of software packages in the R statistical programming 255 environment (R Core Team, 2017) that allow modelling ordinal responses, here we will 256 use the brms (Bayesian Regression Models using Stan) package (Bürkner, 2017, 2018; 257 Carpenter et al., 2017) for several reasons. First, it can estimate all three ordinal model 258 classes introduced above in combination with multilevel structures, category specific effects 259 (except for the cumulative model), unequal variances, and more. Second, brms estimates the 260 models in a Bayesian framework, which provides considerably more information about the 261 model and its parameters (Gelman et al., 2013; McElreath, 2016), allows a more natural 262 quantification of uncertainty (Kruschke, 2014), and is able to estimate models for which 263 traditional maximum likelihood based methods fail (Eager & Roy, 2017). A brief description 264 of the basic concepts of Bayesian statistics is provided in Box 2 (see also Kruschke & Liddell, 265 2018a, 2018b). For a general introduction to brms see Bürkner (2017) and Bürkner (2018). 266 We provide brief notes on ordinal models using other software packages in Section 4.
267 In the tutorial below, we assume that readers know how to load data sets into R, 268 and execute other basic commands. Readers unfamiliar with R may consult free online R 269 tutorials^3. The complete R code for this tutorial, including the example data used here, 270 can be found at (https://osf.io/cu8jv/). To follow the tutorial, users first need to install 271 the required brms R package. Packages should only be installed once, and therefore the 272 following code snippet should only be run once:
install.packages ("brms")
273 Then, in order to have the brms functions available in the current R session, users 274 must load the package at the beginning of every session:
library (brms)
275 Next, we present two real-world data sets from different areas of psychology that 276 contain ordinal variables as the main dependent variable. We remind the readers that ordinal 277 data is not limited to the types of variables introduced here, but can be found in a wide 278 variety of research areas, as noted by Stevens (1946): āAs a matter of fact, most of the scales 279 used widely and effectively by psychologists are ordinal scalesā (p.679).
(^3) A brief introduction to R basics can be found at http://blog.efpsa.org/2016/12/05/ introduction-to-data-analysis-using-r/ (Vuorre, 2016). For a comprehensive, book-length tutorial, we recommend https://r4ds.had.co.nz (Wickham & Grolemund, 2016).
293 on the right-hand side of ~ means that an intercept (i.e. the thresholds in ordinal models) 294 should be included. Although it is included automatically, we added it here for clarity. Note 295 also that R functions allow the arguments to be specified in order, such that if the expected 296 order is known, the argument doesnāt have to be named.
297 In addition, we provided the data and the family arguments. The former takes a data 298 frame from the current R environment. The latter defines the distribution of the response 299 variable, i.e. the specific ordinal model we wish to use, and the desired transformation we 300 want to apply to the predictor termāwhich is nothing else than the distribution function F in 301 ordinal models. We specified cumulative("probit") in order to apply a cumulative model 302 assuming the latent variable (or equivalently the error term ε ) to be normally distributed. If 303 we had omitted "probit" from the specification of the family, the default logistic distribution 304 would have been assumed instead (see Appendix A for details).
305 The model (which we saved into the fit_sc1 variable) is readily summarized via
summary (fit_sc1)
306 ## Family: cumulative 307 ## Links: mu = probit; disc = identity 308 ## Formula: rating ~ 1 + belief 309 ## Data: stemcell (Number of observations: 829) 310 ## Samples: 4 chains, each with iter = 2000; warmup = 1000; thin = 1; 311 ## total post-warmup samples = 4000 312 ## 313 ## Population-Level Effects: 314 ## Estimate Est.Error l-95% CI u-95% CI Eff.Sample Rhat 315 ## Intercept[1] -1.25 0.08 -1.42 -1.10 2681 1. 316 ## Intercept[2] -0.64 0.07 -0.78 -0.50 3629 1. 317 ## Intercept[3] 0.57 0.07 0.43 0.71 3461 1. 318 ## belieffundamentalist -0.24 0.09 -0.43 -0.06 3420 1. 319 ## beliefliberal 0.31 0.09 0.13 0.50 3381 1. 320 ## 321 ## Samples were drawn using sampling(NUTS). For each parameter, Eff.Sample 322 ## is a crude measure of effective sample size, and Rhat is the potential 323 ## scale reduction factor on split chains (at convergence, Rhat = 1).
324 For consistency with other model classes that brms supports, thresholds in ordinal 325 models are called āinterceptsā although, from a theoretical perspective, they are not quite 326 the same. In addition to the regression coefficients (which are displayed under the heading 327 Population-Level Effects), this display includes information about the model (first three 328 rows), data, and the Bayesian estimation algorithm (Samples row; e.g., see Bürkner, 2017; 329 van Ravenzwaaij, Cassey, & Brown, 2016).
330 Of most importance to us are the regression coefficients. The Estimate column 331 provides the posterior means of the parameters, and Est.Error the parametersā posterior 332 standard deviations. These quantities are analogous, but not identical, to frequentist point 333 estimates and standard errors, respectively. l-95% CI and u-95% CI provide the bounds
334 of the 95% credible intervals (CIs; Bayesian confidence intervals; the numbers refer to the 335 2.5 and 97.5 percentiles of the posterior distribution). Although credible intervals can be 336 numerically similar to their frequentist counterparts, confidence intervals, they actually 337 lend themselves to an intuitive probabilistic interpretation, unlike the latter which are 338 often mistakenly so interpreted (Hoekstra, Morey, Rouder, & Wagenmakers, 2014; Morey, 339 Hoekstra, Rouder, Lee, & Wagenmakers, 2015). To get different CIs, use the prob argument 340 (e.g., summary(fit_sc1, prob = .99) for a 99% CI).
341 The two additional columns named Eff.Sample and Rhat, which indicate whether the 342 model fitting algorithm converged to the underlying values, are briefly explained in the last 343 three rows of the output. In short, Rhat should not be larger than 1.1 and Eff.Sample (i.e., 344 āeffective sample sizeā) should be as large as possible. For most applications, Eff.Sample 345 > 1000 is sufficient for stable estimates. Because these quantities are not the focus of this 346 paperāand convergence is not a problem for any of the models considered hereāwe refer 347 the reader to Bürkner (2017) for more details.
348 The first three rows of the output under Population-Level Effects describe the 349 three thresholds of the CM as applied to the stem cell funding opinion data. Recall from 350 above that when the cumulative distribution function F = Φ (standard normal distribution), 351 Y^ Ė is a standard normal variable. Consequently, the thresholds are standard normal deviates 352 and therefore indicate where the continuous latent variable Y Ė is partitioned to produce the 353 observed responses Y , in standard deviation units. Therefore, applying Φ to each threshold 354 leads to the cumulative probability of responses below that threshold if all predictor variables 355 were zero. Although it is important to be able to interpret the thresholds, similar to ordinary 356 regression intercepts, they are rarely of central focus in the modelling endeavor. Instead, we 357 are most interested in the regression coefficients b 1 and b 2 , to which we turn next.
358 Because belief was coded as a factor in R with moderate as the reference category, 359 the coefficients belieffundamentalist and beliefliberal indicate the extent to which 360 people with fundamentalist and liberal religious beliefs differ from those with moderate beliefs 361 on the latent scale Y Ė of opinion in stem cell funding. The point estimate of beliefliberal 362 indicates that people with liberal beliefs hold 0.31 standard deviations more positive opinions 363 toward funding stem cell research on the latent opinion scale Y Ė. The 95%-CI of this 364 parameter is between 0.13 and 0.50 and so does not include zero. We can therefore conclude 365 with at least 95% probability that people with liberal religious beliefs hold more positive 366 opinions regarding the funding of stem cell research than do people with moderate religious 367 beliefs.
368 People with fundamentalist religious beliefs, on the other hand, have more negative 369 opinions regarding funding of stem cell research than do people with moderate religious 370 beliefs. The formerās opinions about stem cell research funding are 0.24 standard deviations 371 more negative than those of the latter, on the latent opinion scale. This parameter is between 372 -0.43 and -0.06 with 95% probability.
373 The results can also be summarized visually by plotting the estimated relationship be- 374 tween belief and rating. Figure 2 displays the estimated probabilities of the four response 375 categories for the three religious belief groups. It becomes quite clear that fundamentalists
Table 3 Summary of regression coefficients for the category-specifc adjacent category model fitted to the stemcell data. Estimate l-95% CI u-95% CI Intercept[1] -0.32 -0.62 0. Intercept[2] -0.73 -0.94 -0. Intercept[3] 0.40 0.22 0. belieffundamentalist[1] -0.13 -0.53 0. belieffundamentalist[2] -0.24 -0.54 0. belieffundamentalist[3] -0.08 -0.33 0. beliefliberal[1] -0.12 -0.57 0. beliefliberal[2] 0.06 -0.25 0. beliefliberal[3] 0.45 0.21 0.
fit_sc2 <- brm ( formula = rating ~ 1 + cs (belief), data = stemcell, family = acat ("probit") )
397 As shown in Table 3, liberals prefer response 4 (ādefinitely fundā) over response 3 398 (āprobably fundā) much more than moderates with a coefficient of b = 0.45 (95%-CI = [0.21, 399 0.68]). At the same time, there is little difference between liberals and moderates for the 400 other response categories; parameters beliefliberal[1] and beliefliberal[2] indicate 401 differences between moderatesā and liberalsā preferences for response 2 over response 1, and 402 response 3 over response 2, respectively. In contrast, fundamentalists prefer lower response 403 categories than moderates throughout, but the differences are quite small and uncertaināas 404 indicated by the rather wide 95%-CIs that also overlap zero.
405 It can be more difficult to interpret the sizes of the ACMās coefficients, in contrast to 406 ones from the CM. Thus, to better understand the magnitudes of the effects, we recommend 407 plotting the modelās predicted values (for instance, via marginal_effects(fit_sc2)). With 408 these data, the resulting figure looks very similar to Figure 2 and thus we do not show it 409 here.
410 3.1.2 Unequal variances. As discussed in Section 2.4.2, by default we assume 411 the variance of the latent variable to be the same throughout the model, an assumption 412 unavoidable in linear regression.^4 Within the framework of ordinal models in brms, we can 413 relax this assumption. For the stem cell data, this implies asking whether variances of the 414 stem cell funding opinion differ across categories of religious belief.
415 Conceptually, unequal variances are incorporated in the model by specifying an
(^4) The assumption of equal variances of residuals can be relaxed in linear regression models as well. However, with ordinal models, (un)equal variances refer to the latent variable Y Ė and not to the manifest variable Y (Liddell & Kruschke, 2017).
416 additional regression formula for the variance component of the latent variable Y Ė. In brms, 417 the parameter related to latent variances is called disc (short for ādiscriminationā), following 418 conventions in item response theory. Importantly, disc is not the variance itself, but the 419 inverse of the standard deviation, s. That is, s = 1 / disc. Further, because disc must be 420 strictly positive, it is by default modeled on the log-scale.
421 Predicting auxiliary parameters (parameters of the distribution other than the 422 mean/location) in brms is accomplished by passing multiple regression formulas to the 423 brm() function. To do so, these formulas must first be wrapped in another function, bf() or 424 lf()ādepending on whether it is a main or an auxiliary formula. These formulas are then 425 combined and passed to the formula argument of brm(). Because the standard deviation 426 of the latent variable is fixed to one for the baseline group (moderates), disc cannot be 427 estimated for all three groups of religous belief. We must therefore ensure that disc is only 428 estimated for the liberals and fundamentalists. To do so, we omit the intercept from the 429 model of disc by writing 0 + ... on the right-hand side of the regression formula. By 430 default, R applies cell-mean coding (cmc) to factors in formulas without an intercept. That 431 would lead to disc being estimated for all three groups, so we must deactivate it via the 432 cmc argument of lf(). With this in mind, an unequal variance CM of the stemcell data is 433 specified as follows:
fit_sc4 <- brm ( formula = bf (rating ~ 1 + belief) + lf (disc ~ 0 + belief, cmc = FALSE), data = stemcell, family = cumulative ("probit") )
434 The syntax for specifying an unequal variance is identical to the syntax of an equal 435 variance model with one important addition: A formula for the disc parameter was added, 436 using a + between the formulas. The formula was wrapped in lf() (ālinear formulaā) to 437 indicate that an auxiliary parameter, such as disc, is predicted.
438 The estimated parameters of the unequal variance model are summarized in Table 439 4. As discussed above, disc is the inverse of the standard deviation of Y Ė , and by default 440 modeled through a log-link, that is we predict log (disc ) instead of disc. To also display 441 the standard deviations s , we transformed log (disc ) to s with s = 1 / exp (log ( disc)).^5 The 442 standard deviation of the latent variable was higher for liberals (SD = 1.26; 95%-CI = [1.06, 443 1.50]) than for moderates for whom the standard deviation was fixed to 1 to identify the 444 model. The standard deviation for fundamentalists (SD = 1.09; 95%-CI = [0.93, 1.28]) was 445 also somewhat higher than for moderates although this difference was not substantial, nor 446 did the CI exclude zero. The main regression coefficients of religious belief also changed 447 slightly, however the main result that liberals tend to prefer more positive responses, and 448 fundamentalists tend to prefer more negative categories than moderates, was similar to the
(^5) Notice that the transformation must be done on the posterior samples of disc, not its posterior summary. The R code to transform disc to s is shown on OSF (https://osf.io/cu8jv/). Please also notice that in the summary output of brms, coefficients of the log-discrimination just have the prefix disc_ although they are in fact on the log-scale.
Table 5 LOO values and differences between four ordinal models of the stemcell data. Model LOOIC SE fit_sc1 2,040.61 31. fit_sc2 2,042.80 31. fit_sc3 2,043.70 30. fit_sc4 2,039.04 31. fit_sc1 - fit_sc2 -2.20 4. fit_sc1 - fit_sc3 -3.10 1. fit_sc1 - fit_sc4 1.57 5. fit_sc2 - fit_sc3 -0.90 6. fit_sc2 - fit_sc4 3.76 1. fit_sc3 - fit_sc4 4.66 6. Note. fit_sc1 = cumulative model with equal variances; fit_sc2 = adja- cent category model with equal vari- ances and category specific effects; fit_sc3 = adjacent category model with equal variances; fit_sc4 = cumu- lative model with unequal variances.
474 implies that estimating category specific effects does not substantially improve model fit. 475 Similarly, the unequal variance CM resulted in only a slightly smaller LOOIC value than the 476 equal variance CM, suggesting that unequal variances improved model fit slightly, but the 477 difference was not substantial.
478 In the context of model selection, a LOO difference greater than twice its corresponding 479 standard error can be interpreted as suggesting that the model with a lower LOO value fits 480 the data substantially better, at least when the number of observations is large enough^7. 481 Based on this logic and the results in Table 5, we might prefer fit_sc1 or fit_sc4 (the 482 equal or unequal variance CM, respectively). However, we remind readers that model 483 selectionābased on any metric, be it a p-value, Bayes factor, or information criterionāis 484 a controversial and complex topic, and therefore suggest replacing hard cutoff values with 485 context-dependent and theory-driven reasoning. For the current example, we favor the 486 unequal variance CM not only because of its goodness of fit (according to LOOIC), but also 487 because it is parsimonious and theoretically best justified.
488 3.1.4 Multiple Likert items. Although outside the scope of this tutorial article, 489 we wish to briefly discuss modeling strategies for data with multiple items per person. The 490 extension is straightforward and can be achieved with hierarchical/multilevel modeling.
(^7) LOO values and their differences are approximately normally distributed. Hence, for models based on enough observations, we may construct a frequentist confidence interval around the estimate. For instance, a 95%-CI around āLOO can be constructed via [āLOO ā 1_._ 96 Ć SE(āLOO) , āLOO + 1_._ 96 Ć SE(āLOO)].
491 In the above example, we only had data for one item per person. However, in many 492 studies the participants provide responses to multiple items. For data with multiple items 493 per person, we can fit a multilevel ordinal model that takes the items and participants 494 into account. This allows incorporating all information in the data into the model, while 495 controlling for dependencies between ratings from the same person and between ratings 496 of the same item. For this purpose, the data needs to be in long format, such that each 497 row is an individual rating, with columns for the value of the rating, and identifiers for 498 the participants and items. Suppose that we had measured opinion about funding stem 499 cell research with multiple items and that we call the identifier columns person and item, 500 respectively. Then, we could write the model formula as follows:
rating ~ 1 + belief + (1 | person) + (1 | item)
501 The notation (1|
508 In summary, this example illustrated the use of CM (with and without unequal 509 variances) and ACM (with and without category-specific effects) in the context of a Likert 510 item response variable. We illustrated how to fit these four models to data using concise 511 R syntax, enabled by the brm() function, and how to print, interpret, and visualize the 512 modelās estimated parameters. Paired with effective visualization (see Figure 2), the modelsā 513 results are readily interpretable and rich in information due to fully Bayesian estimation. 514 We also found that, in this example, category-specific effects did not meaningfully improve 515 model fit, and that the CMs proved a better fit than the ACMs. Further, there was a small 516 improvement in model fit of the unequal variances CM over the equal variances CM.
517 3.2 Years until divorce
518 In the second example, we will analyse the marriage data set introduced in Section 2. 519 and Table 2. We wish to predict the duration (in years) of first marriage (variable years), 520 which ends either by divorce or continues beyond the time of the survey. These data can 521 be understood as discrete time-to-event data, with the event of interest being divorce. As 522 predictors we will use the participantsā age at marriage (variable age) and whether the 523 couple was already living together before marriage (variable together).
524 Years of marriage can be thought of as a sequential process: Each year, the marriage 525 may continue or end by divorce, but the latter can only happen if it did not happen before. 526 This clearly calls for use of the sequential model and we seek to predict the time until divorce 527 (i.e., the time until marriage stops ; for alternative formulations see Appendix A). Further, 528 we assume an extreme-value distribution for the latent variables Y Ė k (corresponding to the 529 cloglog link in brms; see Appendix A), because it is the most common choice in discrete