1

What is best way to run OLS in R with linear inequality constraints, e.g. $$y(x)= ax + b,$$ where $0<a<1$?

QuantIbex
  • 4,086

1 Answers1

1

You can use constrOptim to minimise the RSS, subject to the constraints. There's an example in Modern Applied Statistics with S of using optim to do logistic regression via direct minimisation of the negative log-likelihood; just do the same, but changing the binomial likelihood to sums of squares and adding the constraint.

Hong Ooi
  • 8,249