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 to less than zero). R code Your help is appreciated. Dereje [[alternative HTML version deleted]]
Hi Dereje On 17 October 2012 04:23, Dereje Bacha <d_bacha at yahoo.com> 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 codecoef(fitols$eq[[1]])> How do I restrict coefficient of X2 in the first equation > (say , restrict it to less than zero). R codesystemfit() can only impose equality constraints. More information about systemfit is available here: jstatsoft.org/v23/i04/paper and www-systemfit.org Best regards, Arne -- Arne Henningsen arne-henningsen.name