On Oct 31, 2011, at 3:31 PM, Bert Gunter <gunter.ber...@gene.com> wrote:
> Well, if I understand the question correctly (following the posting guide > would have spared guessing, as usual), forget packages -- nothing more than > elementary algebra is needed. > > e.g. > > lm(y ~ x1 + x2 + x3) subject to the constraint beta_2 = beta_3, the > coefficients of x2 and x3, is the same as > > lm (y ~ x1 + z) where z = x3 + x3 (sum of the 2 covariate vectors). > I would have expected to divide the beta_z by 2 to get the beta2 = beta3. Did I over-think this? -- David > etc. etc. ... ??? > > -- Bert > > On Mon, Oct 31, 2011 at 12:16 PM, Kristian Lind < > kristian.langgaard.l...@gmail.com> wrote: > >> I believe the package systemfit can help you with that. Haven't tried it >> myself, but give it a go. >> >> Regards, >> >> Kristian >> >> 2011/10/31 JW <j...@phatrasecurities.com> >> >>> Please advice on the package I should use to run a linear regression >> model >>> (weighted least squared) with linear equality constraint. I initially >>> tried >>> "constrOptim" but it turned out that it only supported inequality linear >>> constraint. Thank you very much in advance. >>> >>> Cheers, >>> >>> Jon >>> >>> -- >>> View this message in context: >>> >> http://r.789695.n4.nabble.com/Linear-Regression-with-Linear-Equality-Constraint-tp3956588p3956588.html >>> Sent from the R help mailing list archive at Nabble.com. >>> >>> ______________________________________________ >>> 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. >>> >> >> [[alternative HTML version deleted]] >> >> ______________________________________________ >> 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. >> > > > > -- > > 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 > > [[alternative HTML version deleted]] > > ______________________________________________ > 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. ______________________________________________ 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.