I’m trying to fit a pedigree-based mixed model (ie animal model) to estimate a genetic variance and a couple of fixed effects in a simulated data set. I’ve fitted the model using AsReml-R and MCMCglmm. I wanted to try using pedigreemm but get a error

Error in checkNlevels(reTrms$flist, n = n, control) :
  number of levels of each grouping factor must be < number of observations

I *think* this is telling me I don’t have multiple observations per factor level (here ID) which is true. However, I shouldn’t need repeat measures to estimate the random effect variance here (i.e. VA), so am assuming I have not got the code (below) right. Any pointers v gratefully received.

Alastair

###############
library(pedigreemm)
setwd("c:/prussia/")

voles<-read.table("voles.txt", header=T)
voles$ID<-as.factor(voles$ID)
voles$sex<-as.factor(voles$sex)

volesPED<-read.table("volesPED.txt",header=T)
volesPED2<-pedigree(volesPED$SIRE,volesPED$DAM,volesPED$ID)

model3<-pedigreemm(size~forage+sex+(1|ID), pedigree=list(ID=volesPED2), data=voles, REML=TRUE)




	[[alternative HTML version deleted]]

