Dear all, I am using the nlme package to find the best model using non-linear mixed effects model. After the all the other things needed, I did > M1<- nlme(NShrubs~A*exp(-B*CED),data=DataSg,fixed=list (A~SITE,B~1), random=B~1,start=list(fixed=c (1.66,1.66,1.66,1.66,1.66,1.66,1.66,1.66,0.0038)),control=lmc) and it was ok. However, the data showed to need random parameters at both the intercept and the slope. And I can not understand why do I always get an error message like: Error in parse(text = paste("~", paste(nVal, collapse = "/"))) : unexpected end of input in "~ " or Error in nlme.formula(NShrubs ~ A * exp(-B * CED), data = DataSg, fixed = list(A ~ : random formula must be a formula or list of formulae Could you please tell me where/what am I doing wrong (in any of the following options I have uses)? > M1<- nlme(NShrubs~A*exp(-B*CED),data=DataSg,fixed=list (A~SITE,B~1), random=list(B~1),start=list(fixed=c (1.66,1.66,1.66,1.66,1.66,1.66,1.66,1.66,0.0038)),control=lmc) > M1<- nlme(NShrubs~A*exp(-B*CED),data=DataSg,fixed=list (A~SITE,B~1), random=list(B~1(SITE)),start=list(fixed=c (1.66,1.66,1.66,1.66,1.66,1.66,1.66,1.66,0.0038)),control=lmc) > M1<- nlme(NShrubs~A*exp(-B*CED),data=DataSg,fixed=list (A~SITE,B~1), random=~CED,start=list(fixed=c (1.66,1.66,1.66,1.66,1.66,1.66,1.66,1.66,0.0038)),control=lmc) > M1<- nlme(NShrubs~A*exp(-B*CED),data=DataSg,fixed=list (A~SITE,B~1), random=list(A~I,B~I),start=list(fixed=c (1.66,1.66,1.66,1.66,1.66,1.66,1.66,1.66,0.0038)),control=lmc) > M1<- nlme(NShrubs~A*exp(-B*CED),data=DataSg,fixed=list (A~SITE,B~1), random=~1,start=list(fixed=c (1.66,1.66,1.66,1.66,1.66,1.66,1.66,1.66,0.0038)),control=lmc) > M1<- nlme(NShrubs~A*exp(-B*CED),data=DataSg,fixed=list (A~SITE,B~1), random=~1|SITE,start=list(fixed=c (1.66,1.66,1.66,1.66,1.66,1.66,1.66,1.66,0.0038)),control=lmc) > M1<- nlme(NShrubs~A*exp(-B*CED),data=DataSg,fixed=list (A~SITE,B~1), random=~1|SITE/T,start=list(fixed=c (1.66,1.66,1.66,1.66,1.66,1.66,1.66,1.66,0.0038)),control=lmc) I would be really greatful if you can please help me on this. Best regards, Sara Maltez Mouro Centro de Ecologia Funcional Departamento de Botânica Universidade de Coimbra sara@gmesintra.com www.uc.pt/ecology/saramaltezmouro [[alternative HTML version deleted]]