[R] Using outer with function predict
Etienne Stockhausen
einohr2002 at web.de
Fri Jan 8 20:49:09 CET 2010
Hey everybody,
I have a problem with the combination of the commands outer() and predict(). I want to visualize the solutions of a regression modell in a matrix. Therefore I want to use the command predict for a linear modell as the function inside the command outer. I've made a small example:
x = 1:10
y = 11:20
z = rnorm(10)
lm.1 = lm(z ~ x*y)
mat = outer(x,y, predict, lm.1)
That didn't work, but I don't understand why? Isn't it possible to combine these two commands? I hope my intention becomes clear.
I'm looking forward for any ideas or hints, that might help me.
I wish everybody a nice weekend.
Best regards
Etienne
___________________________________________________________
Preisknaller: WEB.DE DSL Flatrate für nur 16,99 Euro/mtl.!
http://produkte.web.de/go/02/
More information about the R-help
mailing list