[R] Error in NLME (nonlinear mixed effects model)
l.banin05 at leeds.ac.uk
Mon May 11 19:46:34 CEST 2009
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)),
This returns the error:
Error in getGroups.data.frame(dataMix, eval(parse(text = paste("~1", deparse(groups[]), :
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,
More information about the R-help