[R] Seeking optimal mixture

Kari Ruohonen kari.ruohonen at saunalahti.fi
Wed Sep 26 15:37:06 CEST 2001

```This is maybe not directly an R problem but I have used R to try to solve
it so I think somebody may be able to help.

I have a mixture model with three components and a quadratic Scheffe
polynomial p1x1+p2x2+p3x3+p12x1x2+p13x1x3+p23x2x3 fitted to the response.
Now I'd like to compute the mixture corresponding the maximum response.
Model for Y1 has the parameters

p1=124.02
p2=60.973
p3=41.479
p12=106.824
p13=140.422
p23=81.012

Solving a system of linear equations (solve(A,b)) of the partial derivates
and putting a constraint of x1+x2+x3=1 with Lagrange's multiplier finds
the mixture

x1=0.760208
x2=0.08256986
x3=0.15722207

that produces the maximum response 130.378 within the experimental region.

Now, my model for another response Y2 has the parameters

p1=35.8147
p2=42.1012
p3=51.7479
p12=19.9611
p13=0.2531
p23=-6.6498

Solving as above with the partial derivatives gives

x1=0.3150576
x2=0.60094504
x3=0.08399731

that produces Y2(max)=44.381. But this is not the maximum since e.g.

x1=0
x2=0.25
x3=0.75

produces 48.089 (but is not necessarily the maximum response).

I have looked at optim() and wondered if I could use it somehow to solve
constraint x1+x2+x3=1. All help is appreciated.

Regards,

Kari Ruohonen

----------------------------------------------
Kari Ruohonen
Finnish Game and Fisheries Research Institute
Socioeconomic and Aquaculture Research

Turku Game and Fisheries Research
Itäinen Pitkäkatu 3, 20520 Turku, Finland
tel. +358-20-5751681, +358-40-5238321 (mobile)
fax  +358-20-5751689

http://www.rktl.fi

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._

```