[R] ols/gls or systemfit (OLS, WLS, SUR) give identical results
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)
> 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.
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?
> [[alternative HTML version deleted]]
> R-help at stat.math.ethz.ch mailing list
> PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
More information about the R-help