[R] Error clmm(){ordinal}

Rune Haubo rune.haubo at gmail.com
Mon Jun 2 18:55:00 CEST 2014


It's telling you that one or more of the grouping factors for the
random-effect terms has less than three levels. From what you write,
this seems to apply to Location: you may want to treat it as a
fixed-effect instead.

Hope this helps,
Rune

On 2 June 2014 14:00, adesgroux <aurore.desgroux at rennes.inra.fr> wrote:
> Dear all,
>
> I am trying to run the function clmm() on a data table composed as following
> :
> <http://r.789695.n4.nabble.com/file/n4691592/datatable.png>
>
> I have 187 pea lines assessed on 4 years * 2 locations * 3 blocs * 15
> plantes for disease resistance. Disease resistance is assessed with a 0-to-5
> scale which made an ordinal variable.
> Here is the script a wrote :
>
>>Tab.INRCh=read.csv("INRChamp201013.csv",sep=";")
>>Tab.INRCh$Year=as.factor(Tab.INRCh$Year)
>>Tab.INRCh$RRI<-factor(Tab.INRCh$RRI,levels=c("5","4","3","2","1","0"),ordered=TRUE)
>>Tab.INRCh$RRI_DHW1<-factor(Tab.INRCh$RRI_DHW1,levels=c("5","4","3","2","1","0"),ordered=TRUE)
>>Tab.INRCh$RRI_DHW2<-factor(Tab.INRCh$RRI_DHW2,levels=c("5","4","3","2","1","0"),ordered=TRUE)
>
>>Modele=clmm(RRI~Line+RRI_DHW1+RRI_DHW2+(1|Year)+(1|Location)+(1|Not)+(1|Bloc)+(1|Plante),data=Tab.INRCh,na.action=na.omit)
>
> I want to create this modele to run function Anova() to know if disease
> resistance is different among lines.
>
> When I run the script, I have an error :
> Erreur : all(sapply(gfl, nlevels) > 2) is not TRUE
> I can't find anything about it on the internet...
> Can someone help me on this?
>
> Thanks
> Best regards
> Aurore
>
>
>
> --
> View this message in context: http://r.789695.n4.nabble.com/Error-clmm-ordinal-tp4691592.html
> Sent from the R help mailing list archive at Nabble.com.
>
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.



More information about the R-help mailing list