To specify Family id as random effect in GLMM or lme
===

I am trying to fit generalized linear mixed model in R. I have big pedigree and genotype data. I tried this:

m1 <- lmer(Final_sx~(1 | ID)+cohort2+cohort3+cohort4+sex, data=solar_new_phen,family=poisson)

And it gave me message:
Number of levels of a grouping factor for the random effects
is *equal* to n, the number of observations

I have seen in most of tutorials people are using ID as clustering variable. In kinship package as well in lmekin function it is like this:

rand.eff=formula(paste("~1|",sub.ID))
fit <- try(lmekin(fixed=fix.eff,data=x,random = rand.eff,varlist=list(kmat)))

Should I be using individual id or family id as random effect? I am confused. I have pedigrees and I think I should be using Family ID as clustering variable. It would be great if someone can guide me with little explanation about random effects.

Thanks,

Manav

