0

I'm trying to fit a mixed model to see whether or not the change in my measurements (variable "diff") is significantly different from zero (taking to account subject's individual effects). Here's my data frame:

 > dput(mixed)
 structure(list(subject.id = c(4, 4, 4, 4, 6, 6, 6, 6, 9, 9, 9, 
 9, 12, 12, 12, 12, 13, 13, 13, 13, 15, 15, 15, 15, 19, 19, 19, 
 19, 21, 21, 21, 21, 23, 23, 23, 23, 28, 28, 28, 28), diff = c(-1, 
 -3, -5, 4, 0, -1, 1, -11, 0, -9, 11, -2, 0, -1, -4, 0, -3, -2, 
 -1, -4, -8, 2, -5, NA, 3, -2, -3, -3, -5, -9, 3, -2, 1, 2, 9, 
 -17, 25, -9, NA, NA)), row.names = c(NA, -40L), class = 
 "data.frame")

     subject.id diff
1           4   -1
2           4   -3
3           4   -5
4           4    4
5           6    0
6           6   -1
7           6    1
8           6  -11
9           9    0
10          9   -9
11          9   11
12          9   -2
13         12    0
14         12   -1
15         12   -4
16         12    0
17         13   -3
18         13   -2
19         13   -1
20         13   -4
21         15   -8
22         15    2
23         15   -5
24         15   NA
25         19    3
26         19   -2
27         19   -3
28         19   -3
29         21   -5
30         21   -9
31         21    3
32         21   -2
33         23    1
34         23    2
35         23    9
36         23  -17
37         28   25
38         28   -9
39         28   NA
40         28   NA

Basically, I have 4 days of pre and post measurements for my 10 subjects. The above data comes from the difference between pre and post measurements. Here's my code:

 mod.crossshift <- lmer(formula =diff ~ 1 + (1|subject.id), data = 
 mixed, REML = FALSE)

When I run the model, I do see the results, but I also get an error: "boundary (singular) fit: see ?isSingular"

Upon some google search, it seems like this happens sometimes because the model is overcomplicated, but as far as I know, this one is as simple as a model can get.

What does this mean and can I ignore/fix it?

Nilou
  • 11
  • 1
  • 2
  • 3
    I've voted to close/migrate to [CrossValidated](https://stats.stackexchange.com). Have you searched over there for answers about singular fits in mixed models? – Ben Bolker May 04 '19 at 00:06
  • also: http://bbolker.github.io/mixedmodels-misc/glmmFAQ.html#singular-models-random-effect-variances-estimated-as-zero-or-correlations-estimated-as---1 – Ben Bolker May 04 '19 at 00:25

0 Answers0