[R] linear terms within a nonlinear model

Ben Bolker bolker at zoo.ufl.edu
Tue Sep 26 05:34:56 CEST 2006

   I have a complicated nonlinear function, myfun(a,b,c),
that I want to fit to data, allowing one or more of the parameters
a, b, and c in turn to have linear dependence on other covariates.
In other words, I'd like to specify something like


  I know would this work in nlme *if I wanted to specify
random effects as well*, but I don't -- and wasn't able
to figure out how to specify a "null" random effect.
(Have looked in Pinheiro and Bates but haven't yet found
a solution ...)
I don't see how to do it in nls() or nlsList(), short of
implementing the linear structure within myfun().  
  Looked at Jim Lindsey's gnlm package but haven't yet
been able to figure it out.
   Does anyone have any ideas or tips?

    Ben Bolker

More information about the R-help mailing list