[R] linear terms within a nonlinear model

From: Ben Bolker <bolker_at_zoo.ufl.edu>
Date: Tue 26 Sep 2006 - 03:34:56 GMT

   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

nls(y~myfun(a,b,c),linear=list(a~f1,b~1,c~1))

  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?

  thanks
    Ben Bolker



R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. Received on Tue Sep 26 13:39:58 2006

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.1.8, at Tue 26 Sep 2006 - 05:30:08 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.