Re: [R] correlating matrices

2012-09-24 Thread PIKAL Petr
- project.org] On Behalf Of frauke Sent: Friday, September 21, 2012 6:10 PM To: r-help@r-project.org Subject: Re: [R] correlating matrices Thank you for the fast help! I am not sure though if I understand the predict.lm business. The newdata that I would make predictions from consists of six matrices

Re: [R] correlating matrices

2012-09-21 Thread frauke
Thank you for the fast help! I am not sure though if I understand the predict.lm business. The newdata that I would make predictions from consists of six matrices, one for each variable. Do I cbind the matrices like you suggest for the regression and then convert them to a dataframe? How does R

Re: [R] correlating matrices

2012-09-21 Thread Rui Barradas
Hello, As for the first question, predict.lm with new data uses the formula used in the fit so do not change the way you pass on your new data. If the formula was Y ~ X1 + X2 you can use newdata = data.frame(New1, New2) newdata = data.frame(cbind(New1, New2)) but the order must be kept.

[R] correlating matrices

2012-09-19 Thread frauke
Hi, thank you for taking the time and reading my question. My question is twofold: 1. I have several matrices with variables and one matrix with water levels. I want to predict the water level with the data in the other matrices. Basically, * mod-lm(matrix1 ~ matrix2+matrix3)* ( What looks like

Re: [R] correlating matrices

2012-09-19 Thread Rui Barradas
Hello, Inline. Em 19-09-2012 19:56, frauke escreveu: Hi, thank you for taking the time and reading my question. My question is twofold: 1. I have several matrices with variables and one matrix with water levels. I want to predict the water level with the data in the other matrices.