[R] ols/gls or systemfit (OLS, WLS, SUR) give identical results

Spencer Graves spencer.graves at pdf.com
Mon Jul 17 04:33:06 CEST 2006

	  I can't say without more information.  If the system were saturated 
(i.e., has as many equations as unknowns), you should get the same 
answer from all the different methods.  However, I just tried a 
saturated model in 'systemfit', with the following results:

 > DF2 <- data.frame(y=1:2, x=3:4)
 > lm(y~x, DF2)
lm(formula = y ~ x, data = DF2)

(Intercept)            x
          -2            1
 > library(systemfit)
 > systemfit("OLS", list(eqn=y~x), data=DF2)
Error in solve.default(sigma, tol = solvetol) :
	system is computationally singular: reciprocal condition number = 0
	  If you'd like more help from this listserve, please supply a simple, 
self-contained example to illustrate your question (as suggested in the 
posting guide! "www.R-project.org/posting-guide.html").

	  Hope this helps.
	  Spencer Graves

Mihai Nica wrote:
>    I might be sorry for asking this question :-)
>     I have two equations and I tried to estimate 
them individually with "lm" and "gls", and then in a
system (using systemfit)  with "OLS", "WLS" and "SUR".
Quite surprisingly (for myself at least) the results
are identical to the last digit.
>     Could someone (please!) give a hint as to what 
am I doing wrong?
> Thanks,
> mihai
> ---------------------------------
> 	[[alternative HTML version deleted]]
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html

More information about the R-help mailing list