[R] Restricted Least Squares

Prof Brian Ripley ripley at stats.ox.ac.uk
Sat Aug 16 08:24:08 CEST 2008


On Sat, 16 Aug 2008, Nelson Villoria wrote:

> Dear R experts:
>
> Is there any package that estimates Restricted Least Squares?
>
> Specifically, If I want to fit:
>
> G = b0 + b1(Y) + a1(X1) + a2(X2) + a3(X3) + a4(X4)
> where Y, X1 to X4 are variables and b's and a's parameters to be estimated.
>
> I want to impose a1 + a2 + a3 + a4 = 0.

You don't need a package to do that, just re-parametrize.  It is

G ~ Y + I(X1-X4) + I(X2-X4) + I(X3-X4)

-- 
Brian D. Ripley,                  ripley at stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595



More information about the R-help mailing list