Message-ID: <CACk-te1oyAYixG_JjP-O8CkWvObALEja9iqXSAH-VeQP=nN2QQ@mail.gmail.com>
Date: 2011-11-26T14:58:21Z
From: Bert Gunter
Subject: Constrained linear regression
In-Reply-To: <SNT140-W468F1E7EEB9A58E42CFBA4D1CC0@phx.gbl>
Sounds like it is or could be considered a mixtures problem. Check
out the FlexMix package, which looks like it should do exactly what
you want. (But maybe not, so look carefully).
-- Bert
On Sat, Nov 26, 2011 at 6:10 AM, Julia Lira <julia.lira at hotmail.co.uk> wrote:
>
> Dear all,
> I need to run a simple linear regression such that:
> y = b0 + b1*x1 + (1-b1)*x2 + e
> which I know I can use:
> lm(y ~ I(x1 - x2) + offset(x2)).
> However, I also need to restrict the coefficient b1 to be between 0 and 1.
> Is there any way to include such restriction in the linear regression estimation?
> I saw suggestion related with the function Solve.QP, but I really did not understand such method.
> Thanks in advance,
> Julia
> ? ? ? ?[[alternative HTML version deleted]]
>
> ______________________________________________
> R-help at 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.
>
--
Bert Gunter
Genentech Nonclinical Biostatistics
Internal Contact Info:
Phone: 467-7374
Website:
http://pharmadevelopment.roche.com/index/pdb/pdb-functional-groups/pdb-biostatistics/pdb-ncb-home.htm