[R] correlating matrices
frauke
fhoss at andrew.cmu.edu
Fri Sep 21 18:09:39 CEST 2012
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 know which column in the matrix
I created with cbind belongs to which variable in the regression?
One last question. If I use predict.lm without newdata it gives me as many
data points as were used for the regression. However, in my matrices I have
rows of NA for days without observations. My problem is now that if
predict.lm only gives me the datapoints used for regression I can not match
them to the actual observations days anymore. Is there anyway of keeping the
original matrix and put the predicted value in it?
Thanks again, Frauke
--
View this message in context: http://r.789695.n4.nabble.com/correlating-matrices-tp4643660p4643858.html
Sent from the R help mailing list archive at Nabble.com.
More information about the R-help
mailing list