[R] nlsList (nlme) error

Dieter Menne dieter.menne at menne-biomed.de
Fri Jan 25 19:23:45 CET 2008


Rick DeShon <deshon <at> msu.edu> writes:

.. 
> When I use nlsList code that is virtually identical to the example in
> the doc file I get the following error.  
..
>      "Error in nlsList.formula(RT ~ SSasymp(trial, Asym, R0, lrc),
> data = df.group,  :
>       Data must be a groupedData object if formula does not include groups"
.. 
> The data are clearly grouped.  Just to be sure....
> 
> str(df.group)
> Classes 'nfnGroupedData', 'nfGroupedData', 'groupedData' and
> 'data.frame':	15480 obs. of  5 variables:
>  $ id   : Ord.factor w/ 43 levels "31"<"8"<"30"<..: 41 11 33 22 4 27 5

Try to make id a non-ordered factor. I never tried this, but an ordered factor
is treated more like an ordinal equispaced variable.

Dieter



More information about the R-help mailing list