Hi there, I have been trying to fit an NLME to my data. My dataset has two category levels - one is a fixed effect (level1) and one is a random effect (level2), though so far I have only experimented with the highest level grouping (fixed, level1), with the following code:
mod1 <- nlme(H ~ a*(1-exp(-b*D^c)), data=sizes, fixed=a+b+c~factor(Loc), start=c(a=75,b=0.05,c=0.7)) This returns the error: Error in getGroups.data.frame(dataMix, eval(parse(text = paste("~1", deparse(groups[[2]]), : Invalid formula for groups Other points that it may be useful to note in diagnosing the problem are that: 1) I have tried both specifying Loc=as.factor and not specifying this. 2) I have tried other configurations of writing fixed=list(...) or fixed=c(...) and that always generates an error 3) I have not specified groupedData 4) My groups do not have equal sample sizes (unbalanced?) Look forward to hearing back! Thanks in advance, Lindsay ______________________________________________ R-help@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.