On 10/16/2010 09:27 AM, Jumlong Vongprasert wrote: >> predict(lm(x~y),IWJR.complete) > Error in eval(expr, envir, enclos) : object 'x' not found >> > > I'm trying to find answers to solve my problem, but I cann't found what I > want to solve the problem. > What do I have to do to solve this problem.
First isolate it. Break things down into steps by rewriting as fit <- lm(x~y) predict(fit, IWJR.complete) I think you will find that it fails already in the first step, because you didn't tell lm where to look for its variables (it's not going to try guessing it from context, and besides it might not be intended to use the same data as used for prediction). -- Peter Dalgaard Center for Statistics, Copenhagen Business School Phone: (+45)38153501 Email: pd....@cbs.dk Priv: pda...@gmail.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.