| To: | "John Pitchard" <johnpitchard@googlemail.com> |
|---|---|
| Subject: | Re: nlminb with constraints |
| From: | "Douglas Bates" <bates@stat.wisc.edu> |
| Date: | Thu, 23 Aug 2007 08:09:19 -0500 |
| Cc: | s-news@lists.biostat.wustl.edu |
| Dkim-signature: | a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:sender:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references:x-google-sender-auth; b=IwTLIC34PkUqC2bQv42j+fnv4Z7e80TsjDUkD3wFbKjLFNdnV5UcEtrpPZyGrCoa9UhkKj7ZDB0M733RNelPuQmLlb07E70fU8/EVsxLFKD1gkCU/Q8gJTAJOoZ5N1lYPyIqB7b+XYIoH75Wvh8zB1y1xcH37Ji0OWLBLuP5nqE= |
| Domainkey-signature: | a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:sender:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references:x-google-sender-auth; b=AFrdvMjnT/nqi4etDApM9SS38M2HYuQ61KMY1uF/BLtwXzjhM5y8jQgGgejPoAI8PDoGnvOgC9dhqEwscSHW6MpyNrTkACKhnRcHMAnav1a6Roo6WxznZcjKD7++m1me4xzcB8fbvujVfAuIQohNYGlS7EVgZDjd5m1+aCnQHgE= |
| In-reply-to: | <ee4b1650708220654m2ff6f3cfx907d807634c2809a@mail.gmail.com> |
| References: | <ee4b1650708220654m2ff6f3cfx907d807634c2809a@mail.gmail.com> |
On 8/22/07, John Pitchard <johnpitchard@googlemail.com> wrote: > Dear all, > I have a function that I want to minimise, it is in the form of a vector. > However, there is a restriction on the actual vector itself, e.g. if the > vector,x, has n components then > x[n] <- 1 -(x[1] + ...+x[n-1]). > Does anyone know how to put this constraint into the nlminb function? With an equality constraint like this you define the objective as a function of x[1], ..., x[n-1] and internally evaluate x[n] from the other values. Do the x's represent probabilities by any chance? If so, the constraints are more complicated because you must have x[i] >= 0, i = 1,...,n. One way of enforcing this is to use a multivariate version of a logistic transformation. David Jupp used a version of this in a paper on free-knot splines. Don Watts and I describe such a transformation in our 1988 Wiley book "Nonlinear Regression Analysis and Its Applications". |
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | nlminb with constraints, John Pitchard |
|---|---|
| Next by Date: | Re: Editing trees, Greg Snow |
| Previous by Thread: | nlminb with constraints, John Pitchard |
| Indexes: | [Date] [Thread] [Top] [All Lists] |