Dear R-users, I've a question regardiing multiple linear regression. Is it possible to regress a function of the type y=b0+b1*x1+b2*x2 constraining the partial derivatives dy/dx1 and dy/dx2 to be greater than 0 ??? Thank you very much for any possible suggestion. Best regards Marco -- Marco Pagani - PhD Student Dipartimento di Scienze della Terra - Sezione Geofisica Universita' degli Studi di Milano c/o CSGAQ - CNR via Bassini, 15 - I-20133 Milano - Italia tel: +39-02-23699455 fax: +39-02-26680987 / +39-02-2362946 -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- 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 _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
> > Dear R-users, > I've a question regardiing multiple linear regression. > Is it possible to regress a function of the type > y=b0+b1*x1+b2*x2 > constraining the partial derivatives dy/dx1 and dy/dx2 to be greater > than 0 ???One easy possibility is to fit it as a nonlinear regression: y=b0+exp(b1)*x1+exp(b2)*x2 Jim> > Thank you very much for any possible suggestion. > Best regards > Marco > > > -- > Marco Pagani - PhD Student > Dipartimento di Scienze della Terra - Sezione Geofisica > Universita' degli Studi di Milano > c/o > CSGAQ - CNR > via Bassini, 15 - I-20133 Milano - Italia > tel: +39-02-23699455 > fax: +39-02-26680987 / +39-02-2362946 > > > > -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- > 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 > _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._ >-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- 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 _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
> Dear R-users, > I've a question regardiing multiple linear regression. > Is it possible to regress a function of the type > y=b0+b1*x1+b2*x2 > constraining the partial derivatives dy/dx1 and dy/dx2 to be greater > than 0 ???For low dimensional things like the example the easiest approach is to recognise that the solutions has to be one of: y=b0+b1*x1+b2*x2 y=b0+b1*x1 (b2=0) y=b0+b2*x2 (b1=0) y=b0 (b1=b2=0) So you simply pick the one with the lowest RSS that satisfies b1>=0, b2>=0 (assuming you don't require strict inequality). For bigger problems, where the expressions for the partials are not so simple, use quadratic programming. Simon ______________________________________________________________________> Simon Wood snw at st-and.ac.uk http://www.ruwpa.st-and.ac.uk/simon.html > The Mathematical Institute, North Haugh, St. Andrews, Fife KY16 9SS UK > Direct telephone: (0)1334 463799 Indirect fax: (0)1334 463748-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- 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 _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._