Skip to content
Prev 324833 / 398502 Next

lme function cannot find object

Pfeiffer, Steven <pfeiffss <at> miamioh.edu> writes:
You have an extra comma at the end of the first line of
your lme code (indicated with ^^^), so R thinks your interaction term is a
separate argument and tries to intepret it outside the context
of the formula ...

library("nlme")
fit.1<-lme(soil.moisture ~ Trenching + DaysSinceEvent,
                                                   ^^^^^
                                         + Trenching:DaysSinceEvent,
                 random = ~ DaysSinceEvent | Plot,
                 data=Dat.middle,
                 method="ML"
                )