What is the stochastic mechanism that generates the data? In other words, what distribution is Y, conditioned on X1 and X2, supposed to be?
You can also get `a' if you do not wanrt to specify the probability mechanism by just doing a least squares fitting, but then making inferences can be a bit tricky. Ravi. ____________________________________________________________________ Ravi Varadhan, Ph.D. Assistant Professor, Division of Geriatric Medicine and Gerontology School of Medicine Johns Hopkins University Ph. (410) 502-2619 email: rvarad...@jhmi.edu ----- Original Message ----- From: Jim Silverton <jim.silver...@gmail.com> Date: Sunday, October 31, 2010 2:45 am Subject: Re: [R] Constrained Regression To: r-help@r-project.org > Hello everyone, > I have 3 variables Y, X1 and X2. Each variables lies between 0 and 1. > I want > to do a constrained regression such that a>0 and (1-a) >0 > > for the model: > > Y = a*X1 + (1-a)*X2 > > I tried the help on the constrained regression in R but I concede > that it > was not helpful. > > Any help is greatly appreciated > -- > Thanks, > Jim. > > [[alternative HTML version deleted]] > > ______________________________________________ > R-help@r-project.org mailing list > > PLEASE do read the posting guide > and provide commented, minimal, self-contained, reproducible code. ______________________________________________ R-help@r-project.org 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.