[R] extracting and restricting coefficients
Arne Henningsen
arne.henningsen at gmail.com
Wed Oct 17 06:41:27 CEST 2012
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
More information about the R-help
mailing list