[R] Multivariate regression with constraints
Patrizio Frederic
frederic.patrizio at gmail.com
Fri Aug 8 18:56:49 CEST 2008
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 - Princeton-MRAm <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=I1-p1
> R2=I2-p2
>
> 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: 609-275-2176
> Email: yzhang at munichreamerica.com<mailto:yzhang at munichreamerica.com>
>
>
> [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help at 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.
>
More information about the R-help
mailing list