The number of conditionally linear parameters is the same as the
number of terms in the model. Suppose the regression is of the
form
y = b1*f1(x, th) + b2*f2(x, th) + bp*fp(x, th) + E
then the (i,j,k)th element of the gradiant array has to be
d fj(x_i, th) / d th_k
that is, the partial derivative of the ith component of the jth
function with respect to the kth nonlinear parameter.
> Second question: Is this (usually) a good thing to do (it
> would seem to take advantage of everything that one reasonably
> should)?
It can't hurt, I guess, but finding real cases where it is
actually necessary for convergence reasons is not easy (unless,
of course, the number of nonlinear parameters is very large
relative to the number of linear).
> I think a private reply should suffice for this, as it is
> probably not of general interest.
but it probably should be of some general interst, at least. It
took me a long time to find out what was going on, (and I only
know now because Doug Bates told me about it).
Three small comments.
1. there is an open challenge to write a method function for
deriv() to do the job of producing the model function
returning a "plinear" model function equipped with the
gradient attribute.
2. the ms() algorithm can take and use first and second
derivatives, and very often both first and second explicit
derivatives are necessary for the function to work.
3. nlminb seems to be a pretty swish minimiser. There would be
some point in tarting it up a bit so that it took a formula
and data frame and returned an object with class, for which
methods could be written. In this case, too, supplying first
(and second) derivatives can be useful, but there are no
tools written to help. Another job for deriv?
Bill.
-- Bill Venables, Head, Dept of Statistics, Tel.: +61 8 8303 5418 University of Adelaide, Fax.: +61 8 8303 3696 South AUSTRALIA. 5005. Email: Bill.Venables@adelaide.edu.au----------------------------------------------------------------------- This message was distributed by s-news@wubios.wustl.edu. To unsubscribe send e-mail to s-news-request@wubios.wustl.edu with the BODY of the message: unsubscribe s-news