[R] Multiple linear regression
Prof Brian Ripley
ripley at stats.ox.ac.uk
Thu Apr 19 12:03:43 CEST 2001
On Thu, 19 Apr 2001, Jim Lindsey wrote:
> > 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:
If it means > 0 and not >= 0, yes, but if 0 would give a better fit
the nonlinear fit will have problems.
For the latter, there is an example using optim in ch08.R in the MASS
package scripts, and another one for a constrained GLM fit.
Brian D. Ripley, ripley at stats.ox.ac.uk
Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/
University of Oxford, Tel: +44 1865 272861 (self)
1 South Parks Road, +44 1865 272860 (secr)
Oxford OX1 3TG, UK Fax: +44 1865 272595
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
More information about the R-help