RDOccupEG problem

Hi!
I try to run this function from the RDOccupancy help file (the original help file use the RDOccupPG model, so there is no Epsilon):
but when i hit enter, i get this message:
Sorry but that, I do not understand what does it mean, or how can i fix it! Any idea?
Thanks in advance for the answers!
Buco
I try to run this function from the RDOccupancy help file (the original help file use the RDOccupPG model, so there is no Epsilon):
data(RDOccupancy)
run.RDExample=function()
{
Psi.area=list(formula=~samplearea)
Psi.cover=list(formula=~cover)
Psi.areabycover=list(formula=~samplearea*cover)
Psi.dot=list(formula=~1)
Psi.time=list(formula=~time)
p.dot=list(formula=~1)
p.occ=list(formula=~occ)
p.area=list(formula=~sample.area)
p.coverbyocc=list(formula=~occ*cover)
gam.area=list(formula=~samplearea)
epsilon.area=list(formula=~samplearea)
gam.dot=list(formula=~1)
epsilon.dot=list(formula=~1)
time_intervals=c(0,0,1,0,0,1,0,0)
RD_process=process.data(RDOccupancy, model="RDOccupEG", time.intervals=time_intervals)
RD_ddl=make.design.data(RD_process)
model.p.dot.Psi.dot.gam.dot.epsilon.dot<-mark(RD_process, RD_ddl, model.parameters=list(p=p.dot, Psi=Psi.dot, Gamma=gam.dot, Epsilon=epsilon.dot), invisible=TRUE)
model.p.dot.Psi.time.gam.dot<-mark(RD_process, RD_ddl, model.parameters=list(p=p.dot, Psi=Psi.time, Gamma=gam.dot, Epsilon=epsilon.dot), invisible=TRUE)
model.p.dot.Psi.area.gam.area<-mark(RD_process, RD_ddl, model.parameters=list(p=p.dot, Psi=Psi.area, Gamma=gam.area), invisible=TRUE)
model.p.dot.Psi.cover.gam.area<-mark(RD_process, RD_ddl, model.parameters=list(p=p.dot, Psi=Psi.cover, Gamma=gam.area), invisible=TRUE)
model.p.occ.Psi.dot.gam.dot<-mark(RD_process, RD_ddl, model.parameters=list(p=p.occ, Psi=Psi.dot, Gamma=gam.dot), invisible=TRUE)
model.p.occ.Psi.area.gam.dot<-mark(RD_process, RD_ddl, model.parameters=list(p=p.occ, Psi=Psi.area, Gamma=gam.dot), invisible=TRUE)
return(collect.models())
}
robustexample<-run.RDExample()
but when i hit enter, i get this message:
Error in `contrasts<-`(`*tmp*`, value = "contr.treatment") :
contrasts can be applied only to factors with 2 or more levels
Sorry but that, I do not understand what does it mean, or how can i fix it! Any idea?
Thanks in advance for the answers!
Buco