"zhongmiao wang" <[EMAIL PROTECTED]> writes: > Hello, > I have used nlme to fit a model, the R syntax is like > > fmla0<-as.formula(paste("~",paste(colnames(ldata[,9:13]),collapse="+"),"-1")) > > fmla1<-as.formula(paste("~",paste(colnames(ldata[,14:18]),collapse="+"),"-1")) > > fmla2<-as.formula(paste("~",paste(colnames(ldata[,19:23]),collapse="+"),"-1")) > > Block=pdBlocked(list(pdIdent(fmla0),pdIdent(fmla1),pdIdent(fmla2))) > > lme(fixed=Score ~ factor(time)-1,data=ldata,random=list(Block), > + weights=varIdent(form= ~ 1|time), > + correlation=corSymm(form= ~ 1|Block/ID)) > > and the Error message is > Error in parse(file, n, text, prompt) : syntax error in "~ " > > I repeatedly check the "~", however, I cannot find anything wrong with > it. Is there anybody can tell what is wrong? Thank you so much!
Is the character following "~" _really_ a space in all three cases? Shift-space sometimes catches people off guard. -- O__ ---- Peter Dalgaard Ă˜ster Farimagsgade 5, Entr.B c/ /'_ --- Dept. of Biostatistics PO Box 2099, 1014 Cph. K (*) \(*) -- University of Copenhagen Denmark Ph: (+45) 35327918 ~~~~~~~~~~ - ([EMAIL PROTECTED]) FAX: (+45) 35327907 ______________________________________________ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html