[R] Multivariate Regression with Weights

Arne Henningsen arne.henningsen at googlemail.com
Sat Aug 9 23:35:51 CEST 2008


On Saturday 09 August 2008 23:25, Arne Henningsen wrote:
> > -----Original Message-----
> > From: markleeds at verizon.net [mailto:markleeds at verizon.net]
> > Sent: Monday, August 04, 2008 5:15 PM
> > To: Zhang Yanwei - Princeton-MRAm
> > Subject: RE: [R] Multivariate Regression with Weights
> >
> >   the systemfit package can do that and the documentation is quite nice
> > also.
>
> The systemfit() function of the systemfit package can use different weights
> for the different *equations* but NOT different weights for different
> *observations* (if argument "method" is "SUR", "WLS", "3SLS" or "W2SLS").
> I guess that you can divide the first equation by x_1 and the second
> equation by x_2 to obtain
>    y_1^* = 1 + x_2^* + e_1^*
>    y_2^* = 1 + x_1^* + e_2^*

Of course, I meant:
   y_1^* = b_11 + b_12  x_2^* + e_1^*
   y_2^* = b_22 + b_21  x_1^* + e_2^*

(Derived from
   y_1 = b_11  x_1 + b_12  x_2 + e_1
   y_2 = b_21  x_1 + b_22  x_2 + e_2
)

Sorry for my sloppiness.

Arne


> with
>    y_1^* = y_1 / x_1
>    x_2^* = x_2 / x_1
>    e_1^* = e_1 / x_1
>    y_2^* = y_2 / x_2
>    x_1^* = x_1 / x_2
>    e_2^* = e_2 / x_2
>
> In this case, you should have homoscedastic error terms. Hence, you can use
> systemfit to estimate the system of the modified equations.
>
> > On Mon, Aug 4, 2008 at  4:39 PM, Zhang Yanwei - Princeton-MRAm wrote:
> > > Hi all,
> > >   I'd like to fit a multivariate regression with the variance of the
> > > error term porportional to the predictors, like the WLS in the
> > > univariate case.
> > >   y_1~x_1+x_2
> > >   y_2~x_1+x_2
> > >   var(y_1)=x_1*sigma_1^2
>
> I guess that you mean var(e_1). Right?
>
> > >   var(y_2)=x_2*sigma_2^2
> > >   cov(y_1,y_2)=sqrt(x_1*x_2)*sigma_12^2
> > >
> > >  How can I specify this in R? Is there a corresponding function to the
> > > univariate specification lm(y~x,weights=x)?? Thanks.
>
> Unfortunately, systemfit has not (yet) a "weights" argument. (If you add
> this feature, I would be happy if you send me the code that I can include
> this feature in the official version.)
>
> Best wishes,
> Arne

-- 
Arne Henningsen
arne.henningsen at googlemail.com
http://www.arne-henningsen.name
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <https://stat.ethz.ch/pipermail/r-help/attachments/20080809/cf0c87d8/attachment.bin>


More information about the R-help mailing list