[R] Multivariate regression with constraints
Zhang Yanwei  PrincetonMRAm
YZhang at munichreamerica.com
Fri Aug 8 19:25:44 CEST 2008
Thanks.
If I set the coefficient of p1 equal to zero, then I only have three parameters left in the model. Suppose e is the residual matrix for this regression, 2 by 2 here. Is the covariance matrix for the residuals, 2 by 2, still estimated by t(e)%*%e/(n3), where n is the number of observations?
Also, I want to specify different weights for each of the two equations. For example, the first regression weighted by p1, and the second by R1. How can I do that using systemfit? The systemfit("SUR") seems to deal with this problem, but it does not allow one to set the weights explicitely. I wonder if you would help me out on that.
Thanks a lot. Really appreiciate.
Sincerely,
Yanwei Zhang
Department of Actuarial Research and Modeling
Munich Re America
Tel: 6092752176
Email: yzhang at munichreamerica.com
Original Message
From: Patrizio Frederic [mailto:frederic.patrizio at gmail.com]
Sent: Friday, August 08, 2008 12:57 PM
To: Zhang Yanwei  PrincetonMRAm
Cc: rhelp at rproject.org
Subject: Re: [R] Multivariate regression with constraints
Hi Zhang ,
take a look to sur package
http://www.systemfit.org/
regards,
Patrizio Frederic
+
 Patrizio Frederic
 Research associate in Statistics,
 Department of Economics,
 University of Modena and Reggio Emilia, Via Berengario 51, 41100
 Modena, Italy

 tel: +39 059 205 6727
 fax: +39 059 205 6947
 mail: patrizio.frederic at unimore.it
+
2008/8/8 Zhang Yanwei  PrincetonMRAm <YZhang at munichreamerica.com>:
> Hi all,
> I am running a bivariate regression with the following:
>
> p1=c(184,155,676,67,922,22,76,24,39)
> p2=c(1845,1483,2287,367,1693,488,435,1782,745)
> I1=c(1530,1505,2505,204,2285,269,1271,298,2023)
> I2=c(8238,6247,6150,2748,4361,5549,2657,3533,5415)
> R1=I1p1
> R2=I2p2
>
> x1=cbind(p1,R1)
> y1=cbind(p2,R2)
>
> fit1=lm(y1~1+x1)
> summary(fit1)
>
> Response 2:
> Coefficients:
> Estimate Std. Error t value Pr(>t)
> x1p1 1.4969 2.7004 0.554 0.59662
> x1R1 3.0937 0.8366 3.698 0.00767 **
>
>
> One can see that in the second regression, i.e. R2~1+p1+R1, the coefficient for p1 is not significant. I wonder if I can run this bivariate regression again with the constraint that the coefficient for p1 in the second regression equation is zero? Thanks a lot.
>
> Sincerely,
> Yanwei Zhang
> Department of Actuarial Research and Modeling Munich Re America
> Tel: 6092752176
> Email: yzhang at munichreamerica.com<mailto:yzhang at munichreamerica.com>
>
>
> [[alternative HTML version deleted]]
>
> ______________________________________________
> Rhelp at rproject.org mailing list
> https://stat.ethz.ch/mailman/listinfo/rhelp
> PLEASE do read the posting guide http://www.Rproject.org/postingguide.html
> and provide commented, minimal, selfcontained, reproducible code.
>
More information about the Rhelp
mailing list