[R] Error in NLME (nonlinear mixed effects model)
bolker at ufl.edu
Mon May 11 20:39:05 CEST 2009
Lindsay Banin wrote:
> 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)),
> 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
> 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?)
(1) You haven't given us a reproducible example ...
(2) You might try asking this on the r-sig-mixed-models list instead
(3) I suspect your problem might be that nlme can't fit models with no
random effect. Have you tried the
analogous model in gnls ?
View this message in context: http://www.nabble.com/Error-in-NLME-%28nonlinear-mixed-effects-model%29-tp23488199p23489069.html
Sent from the R help mailing list archive at Nabble.com.
More information about the R-help