I am having problem using output of lm() function for further analysing using systemfit package.
Basicaly, the problem s following - I generate several formulas using lm() > fo1 <- lm(r98[,2] ~ f98[,1] + f98[,2] + ... + f98[,43]) > fo2 <- lm(r98[,1] ~ f98[,1] + f98[,2] + ... + f98[,43]) and than I want to estimate a general model using package systemfit. > fitsur <- systemfit("SUR",list(as.formula(fo),as.formula(foo))) and I get following error: Error in systemfit("SUR", list(as.formula(fo), as.formula(foo))) : argument 'formula' must be an object of class 'formula' or a list of objects of class 'formula' and I am not able to find where the problem is. The problem remains even when I try: > fo1 <- r98[,2] ~ f98[,1] + f98[,2] + ... + f98[,43] > fo2 <- r98[,1] ~ f98[,1] + f98[,2] + ... + f98[,43] instead of using lm() Could someone give me a hand? I am quite new to R, so possibly the solutions is simple:) Thanks Zbynek Janoska -- View this message in context: http://r.789695.n4.nabble.com/How-to-use-lm-output-for-systemfit-Seemingly-unrelated-regression-tp2525418p2525418.html Sent from the R help mailing list archive at Nabble.com. ______________________________________________ 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.