
Hi Everyone,

I've been trying to fit a model on Pedigreemm, but I keep getting an error message, that I've seen it's somewhat common, but I don't know how to fix it.

I'm using a dataset containing traits for 4754 individuals an a pedigree with 9682 individuals (most of them have records in the dataset). 

This is what I've been using:
------
> Pedigree=read.csv("ped1.csv", header=T)
> ped=data.frame(Pedigree)
>
> #DATA and variables
> data=read.csv('Lambdata.csv', header=T)
> cdata=na.omit(data)
> WS=cdata$WS
> Age=cdata$Age
> WT=cdata$WT
> ID=cdata$NewID
> Sex=as.factor(cdata$Sex)
>head(cdata)

  NewID  Sex BT RT WW  WT WS Age
1  2033   2  1  1 36  79  2 173
2  2034   2  2  2 19  47  6 169
3  2035   2  2  2 27  75  8 169
4  2037    1  2  1 56 114  6 165
5  2038    2  2  2 45  94  8 169
6  2039   2  2  2 41  86  7 169>
>head(ped1)
  sire  dam
1 <NA> <NA>
2 <NA> <NA>
3 <NA> <NA>
4 <NA> <NA>
5 <NA> <NA>
6 <NA> <NA>>
> #With pedigreemm
> ped1=pedigree(sire=Pedigree$Sire,dam=Pedigree$Dam,label=Pedigree$Progeny)
> system.time(AM1<-pedigreemm(WS~WT+Sex+(1|ID),data=cdata, pedigree=list(ID=ped1)))
>
> system.time(AM1<-pedigreemm(WS~WT+Sex+(1|ID),data=cdata, pedigree=list(ID=ped1)))
Error in function (fr, FL, start, REML, verbose)  : 
  Number of levels of a grouping factor for the random effects
must be less than the number of observations

------
I fitted the same model on Kinship2, but it takes a long time to converge. I know Pedigremm is faster and more flexible, so I really wanted to try it out, but failed.

I looked through some of the postings, but couldn't find a way to fix it...
I'd appreciate any information regarding this topic.

Regards,

Napo Vargas J.
 		 	   		  
	[[alternative HTML version deleted]]

