Re: [R] extracting and restricting coefficients

2012-10-16 Thread Arne Henningsen
Hi Dereje On 17 October 2012 04:23, Dereje Bacha wrote: > I want to fit two equations simultaneously > EQ1<-Y1~X1+X2 > EQ2<-Y2~X1+X2 > eqsystem<-list(Y1HAT=EQ1,Y2HAT=EQ2) > fitols<-systemfit(eqsystem, > method="OLS", data=BB) > > How do I get coefficients for the first equation? R code coef(fito

[R] extracting and restricting coefficients

2012-10-16 Thread Dereje Bacha
HiĀ  I want to fit two equations simultaneously EQ1<-Y1~X1+X2 EQ2<-Y2~X1+X2 eqsystem<-list(Y1HAT=EQ1,Y2HAT=EQ2) fitols<-systemfit(eqsystem, method="OLS", data=BB) How do I get coefficients for the first equation? R code How do I restrict coefficient of X2 in the first equation (say , restrict it t