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?