[R] Linear Regression with Constraints
Stu @ AGS
stu at agstechnet.com
Tue May 26 20:11:44 CEST 2009
I am a bit new to R.
I am looking for the right function to use for a multiple regression problem
of the form:
y = c1 + x1 + (c2 * x2) - (c3 * x3)
Where c1, c2, and c3 are the desired regression coefficients that are
subject to the following constraints:
0.0 < c2 < 1.0, and
0.0 < c3 < 1.0
y, x1, x2, and x3 are observed data.
I have a total of 6 rows of data in a data set.
Is "optim" in the stats package the right function to use?
Also, I can't quite figure out how to specify the constraints.
More information about the R-help