1
$\begingroup$

I am using R's ordinal package to run a mixed regression model with an ordinal dependent variable. The data I am working with looks like this:

      x y z
1  S153 A 2
2   S11 A 2
3   S40 A 2
4  S112 A 1
5  S150 A 2
6   S40 A 2
7   S40 A 2
8  S150 A 2
9   S40 A 2
10  S39 A 2
11 S150 A 2
12  S53 A 2
13 S150 A 2
14 S150 A 2
15  S23 A 2
16  S36 A 1
17  S79 A 2
18 S150 A 2
19  S70 A 2
20 S133 A 1
21  S40 A 2
22 S150 A 2
23  S48 A 2
24  S53 A 2
25 S150 A 2
26  S12 A 2
27 S150 A 1
28  S80 B 2
29 S147 B 3
30  S92 C 2
31   S2 D 2
32  S37 D 2
33  S14 D 2
34  S56 D 2
35  S14 D 2

structure(list(x = structure(c(8L, 1L, 14L, 2L, 7L, 14L, 14L,  7L, 14L, 
13L, 7L, 16L, 7L, 7L, 10L, 11L, 19L, 7L, 18L, 4L, 14L,  7L, 15L, 16L, 7L, 3L, 
7L, 20L, 6L, 21L, 9L, 12L, 5L, 17L, 5L), .Label = c("S11",  "S112", "S12", 
"S133", "S14", "S147", "S150", "S153", "S2", "S23",  "S36", "S37", "S39", 
"S40", "S48", "S53", "S56", "S70", "S79", "S80", "S92"), class = "factor"), y = 
structure(c(1L, 1L, 1L,  1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 
1L, 1L, 1L,  1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 2L, 2L, 3L, 4L, 4L, 4L, 4L, 4L ), 
.Label = c("A", "B", "C", "D"), class = "factor"), z = c(2L,  2L, 2L, 1L, 2L, 
2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 1L, 2L,  2L, 2L, 1L, 2L, 2L, 2L, 2L, 
2L, 2L, 1L, 2L, 3L, 2L, 2L, 2L, 2L,  2L, 2L)), .Names = c("x", "y", "z"), 
class = "data.frame", row.names = c(NA, -35L))

Variable 'z' is my response variable (ordinal factor). Variable 'y' is my predictor and I want to include 'x' as random effects. To do this, I am using clmm as follows:

m1 <- clmm(factor(z, ordered=T) ~ y + (1|x) , data=df)

However, this results in the following warning message:

Warning message:
(1) Hessian is numerically singular: parameters are not uniquely determined 
In addition: Absolute convergence criterion was met, but relative criterion was not met

I have tried running this with clm excluding the random effects and I keep getting the same warning.

Here is the table of the predictor and response variabes:

table(df$z,df$y)

     A  B  C  D
  1  4  0  0  0
  2 23  1  1  5
  3  0  1  0  0

I am not sure if this is a problem of complete separation or not. Why am I getting this warning and how can I deal with it?

$\endgroup$
3
$\begingroup$

Is that your complete data set? If so, I think I can see the problem. Factor z almost always takes value 2, and value 3 is achieved only once. Your response isn't changing very much, so it's not easy to estimate the parameters. The random effect also seems to load heavily on factor A. Your data set is not really informative about factor A and the response y. The optimizer knows this.

The Hessian is singular because the optimizer can't distinguish some of your parameters. This makes sense, given that your data set does not really distinguish them either. So you need a more balanced data set. It would also be nice to have a larger sample size.

$\endgroup$
  • $\begingroup$ No, this is just a subset of my data and I am using it to answer one particular question: "Are there significant differences in the reposnse variable between A, B, C and D?". If there weren't, I would be able to group them all under the same category and get: 4 observations for z=1, 30 for z=0 and 1 for z=3. $\endgroup$ – user4451922 Dec 22 '15 at 4:08
  • $\begingroup$ But like you said this might be a sample too small to test that. Would it be fine to just collapse the categories without any testing then (given that they are similar in nature and will be more informative grouped than separated in the overall data set)? $\endgroup$ – user4451922 Dec 22 '15 at 4:28
  • $\begingroup$ you could do that. Then check the residuals against the levels of the collapsed factors. $\endgroup$ – Placidia Dec 22 '15 at 12:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.