[R] Fit with constraints (fwd)

About this list Date view Thread view Subject view Author view

Agustin Lobo (alobo@ija.csic.es)
Mon, 22 Nov 1999 20:50:31 +0100 (MET)



I would like to fit a model of the type

Y = Xf + e

where f are cover fractions (or percent cover). Therefore,
I must constrain the fit to
1. sum(f) = 1
2. 0<= f <=1

How can I introduce these 2 constraints in a ML fit?

Currently, I'm using nlregb and I'm using the "upper and
low" keywords to set the bounds and
use the following to ensure that sum(f) = 1:

let's say I have 3 fractions, then f3=1-f1-f2 and

Y = f1*X1 + f2*X2 +(1-f1-f2)*X3
Y - X3 = f1(X1-X3) + f2*(x2-X3)

so I minimize (considering Z <- X[,1:2] - X[,3])

Y- X3 - Z%*%F

The problem is that I get very odd f, which
are very dependent on what f I choose to be
the one to be calculated by difference (the f3 above).

Is there any way to apply the same constraints to
a ML method?

Thanks

Agus

Dr. Agustin Lobo
Instituto de Ciencias de la Tierra (CSIC)
Lluis Sole Sabaris s/n
08028 Barcelona SPAIN
tel 34 93409 5410
fax 34 93411 0012
alobo@ija.csic.es
http://pangea.ija.csic.es/alobo

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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@stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._


About this list Date view Thread view Subject view Author view

This archive was generated by hypermail 2.0b3 on Tue 04 Jan 2000 - 13:34:01 EST