Hello, my name is Phyllis. 
It would be very much appreciated if you could advise me regarding usage of боlme4бп package in R.
 
I tried to fit a mixed model for the binomial dataset: e.g. Each dataset row (group1) consists of information of number of positive cases and number of trials. 
The number of each dataset row (group1) is 30 and it is the same with the total number of observation. Another group variable (group2) has 4 levels. 
 
The example dataset is as follows:
 
group1
group2
positive
trials
1
1
0
31
2
1
0
27
3
1
5
48
4
1
0
22
5
1
0
50
6
1
0
50
7
1
0
45
8
1
0
50
9
1
0
49
10
2
0
50
11
2
0
28
12
2
0
19
13
2
1
16
14
2
0
50
15
2
0
50
16
2
0
25
17
2
10
50
18
3
0
50
19
3
0
29
20
3
1
50
21
3
0
50
22
3
0
50
23
3
0
50
24
3
0
35
25
3
0
50
26
3
0
50
27
3
0
13
28
3
0
50
29
3
7
50
30
3
5
50
 
 
When I fit a constant mixed model with боgroup1бп random factor in R version 2.7.1 (2008-06-23), it provides the model results is as follows.
(The intention of using each observation as a lowest group factor( random factor) was to take account of each positive case out of trials (like a Bernoulli)which consists of each observation.)
 
 
 
 library(lme4)
 
 group1&lt;-c(1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30)
 group2&lt;-c(1,1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2,3,3,3,3,3,3,3,3,3,3,3,3,3)
 positive&lt;-c(0,0,5,0,0,0,0,0,0,0,0,0,1,0,0,0,10,0,0,1,0,0,0,0,0,0,0,0,7,5)
 trials&lt;-c(31,27,48,22,50,50,45,50,49,50,28,19,16,50,50,25,50,50,29,50,50,50,50,35,50,50,13,50,50,50)
 
 #----------------------------------------------------------------------------------------------
 
 m1&lt;- lmer(cbind(positive,trials-positive) ~ 1 + (1|group1) ,family = binomial)
 summary(m1)
Generalized linear mixed model fit by the Laplace approximation 
Formula: cbind(positive, trials - positive) ~ 1 + (1 | group1) 
 AIC BIC logLik deviance
 42.77 45.57 -19.38 38.77
Random effects:
 Groups Name Variance Std.Dev.
 group1 (Intercept) 30.908 5.5595 
Number of obs: 30, groups: group1, 30
 
Fixed effects:
 Estimate Std. Error z value Pr(>|z|) 
(Intercept) -9.099 1.907 -4.771 1.83e-06 ***
---
Signif. codes: 0 бо***бп 0.001 бо**бп 0.01 бо*бп 0.05 бо.бп 0.1 бо бп 1
 
 
However, I have the error message, when I fit the same model using in R version 2.9.2 (2009-08-24). The results is as follows.
 
 
library(lme4)
 
 group1&lt;-c(1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30)
 group2&lt;-c(1,1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2,3,3,3,3,3,3,3,3,3,3,3,3,3)
 positive&lt;-c(0,0,5,0,0,0,0,0,0,0,0,0,1,0,0,0,10,0,0,1,0,0,0,0,0,0,0,0,7,5)
 trials&lt;-c(31,27,48,22,50,50,45,50,49,50,28,19,16,50,50,25,50,50,29,50,50,50,50,35,50,50,13,50,50,50)
 
 #----------------------------------------------------------------------------------------------
 
 m1&lt;- lmer(cbind(positive,trials-positive) ~ 1 + (1|group1) ,family = binomial)
Error in function (fr, FL, glmFit, start, nAGQ, verbose) : 
 Number of levels of a grouping factor for the random effects
must be less than the number of observations
 summary(m1)
Error: object 'm1' not found
Error in summary(m1) : 
 error in evaluating the argument 'object' in selecting a method for function 'summary'
 
 
 
C.f. A model with a боgroup2бп ( level 4) random factor in both version of R programs work (provides the same results).
 
 
Could you please advise me about the problem? : According to the error message, 
should number of levels of a grouping factor for the random effects (in the case of боgroup1бп is 30) be lesser than the number of observations(e.g.30)? 
 
 
Thank you very much and it would be a great honour if you I could hearing from anybody. 
Thank you.
 
 

	[[alternative HTML version deleted]]

