An embedded and charset-unspecified text was scrubbed... Name: not available URL: <https://stat.ethz.ch/pipermail/r-help/attachments/20121016/375cf021/attachment.pl>
extracting and restricting coefficients
2 messages · Dereje Bacha, Arne Henningsen
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 code
coef(fitols$eq[[1]])
How do I restrict coefficient of X2 in the first equation (say , restrict it to less than zero). R code
systemfit() can only impose equality constraints. More information about systemfit is available here: http://www.jstatsoft.org/v23/i04/paper and http://www-systemfit.org/ Best regards, Arne
Arne Henningsen http://www.arne-henningsen.name