[R-sig-ME] repeated measures: levels of grouping factor must be less than number of obs

Brent Pedersen bpederse at gmail.com
Mon Apr 18 17:33:13 CEST 2011


hi, I posted this to the main R mailing list a while back and people
directed me to
the lme4 package and this mailing list so I thought I might get more
help here...

We have some data, a subset of which is pasted at the end of this message.
I am trying to understand how to do repeated measures as our study
design consists of a subject (proband) and 1 or 2 siblings.

Thus far, our model looks like this--with family_id indicating a
sibling relationship:

>  model = lmer(y ~ concordant + age.proband + age.other + sex.proband + sex.proband + sex.other + (1| family_id), data=df2)

is the above formulation sufficient to capture the repeated measures by family?
Next, when I do this with lme4a, I get an error:

  Error in lmer(y ~ concordant + age.proband + age.other + sex.proband +  :
    number of levels of each grouping factor must be less than number of obs

I have seen this thread:
http://permalink.gmane.org/gmane.comp.lang.r.lme4.devel/3313
but the change does not appear to be included in the latest lme4a
package from Rforge, is there another repo where this has been
incorporated? or is this an error on my part?


thanks,
-brent

concordant  family_id   external_ref.proband    external_ref.other
sex.proband sex.other   age.proband age.other   y(fake)
T   58  80015550    80015543    M   F   15  19  1
F   58  80015550    80016946    M   F   15  8   2
T   54  80015499    80015338    F   F   5   7   3
F   54  80015499    80013112    F   M   5   13  4
F   22  80012269    80012252    F   F   12  10  5
F   22  80012269    80018691    F   M   12  8   5




More information about the R-sig-mixed-models mailing list