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.
______________________________________________
[email protected] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.