Dear R users,
I have a question on the function systemfit from the systemfit package. This 
function returns a list of the class systemfit, which besides all other 
information, contains the data frame of the whole system, called “data”. I have 
noticed the following issue.
Suppose that I have to estimate a single equation (the simplest case), for 
example:
x ~ y + z

so I call systemfit like that:

a <- systemfit(method=”OLS”,eqns=formula(“x~y+z”),data=data.frame(cbind(x,y,z)))

Then, a$data contains the variables x,y and z in its columns. So far so good. 
However, if I do not want an intercept term to be evaluated and I call 
systemfit like that:
a <- systemfit(method=”OLS”,eqns=formula(“x ~ -1 + y + 
z”),data=data.frame(cbind(x,y,z)))

then a$data contains only x and z in its columns. The regressor y is missing.
The same issue is valid for systems of equations: if an intercept term is not 
allowed, “data” contains everything it should with the exception of the first 
variables on the right hand side of the equations. If an intercept term is 
allowed, then “data” does contain the data frame of the whole system.

If I do something wrong, please tell me. 
I am looking forward to your reply.
Regards,
Martin

-----------------------------------------------------------------
Всички учебници и помагала - отстъпка+доставка WWW.MOBILIS.BG

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to