[R] Restricted Least Squares

Nelson Villoria nvilloria at gmail.com
Sat Aug 16 17:19:48 CEST 2008


Thank you very much Dr. Brian -- I appreciate your response. I
understand the idea of building the constraints into the equation but
my problem is that i have to deal with potentially hundreds of dummy
variables, and I want the sum of their estimates to equal zero, so LS
can be fitted with an intercept and a singular X'X matrix - moreover,
in different regressions the number of dummies is also potentially
different so i was hoping to use some restrictions of the form R*beta
= 0, where R is the matrix of restrictions and beta the dummy
parameters. I have written my own estimator based on Greene and Seeks
(REView of Economics and STATistics, 1991), but wanted to know if
there was a package out there making things easier.

Nelson Villoria

On Sat, Aug 16, 2008 at 2:24 AM, Prof Brian Ripley
<ripley at stats.ox.ac.uk> wrote:
> 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