[R] Linear regression with constraints on the parameters.

Gopi Goswami grgoswami at gmail.com
Tue Oct 9 03:09:46 CEST 2007


Hi there,


Is there an existing package in R that does simple linear regression
with linear constraints on the parameters? Here is the set up:

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
y_i = \sum_{k = 1}^K \beta_k x_k + \epsilon_i

where

\sum_{k = 1}^K c_k \beta_k = c_0, for some known constants \{ c_k \}_{k = 0}^K
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%




A proposed solution is to consider the following (with \{ d_k \}_{k =
0}^K that are obvious functions of \{ c_k \}_{k = 0}^K):

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\beta_K = d_0 + \sum_{i=1}^{K-1} d_i \beta_i for known d_i

\implies \beta_K x_K = d_0 x_K + \sum_{i=1}^{K-1} d_i \beta_i x_K

\implies y - d_0 x_K = \beta_0 + \sum_{i=1}^{K-1} \beta_i (x_i + d_i  x_K)
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%



Is there any existing package that does this? Has anyone used the glmc
package to do this sort of thing? An example will be much appreciated.



Thanks a lot,
gopi.



More information about the R-help mailing list