Hi list,
I have trying to calculate the covariance/correlation of three elements.  I
have vector say,

v <- c(700, 800, 1000)

I want to have a 3 by 3 correlation matrix, meaning cor(v1, c2), cor(v1,
c3), cor(v2, v3), etc...

So far I get,
> cor(v)
Error in cor(v) : supply both 'x' and 'y' or a matrix-like 'x'

> vvv <- cbind(v, v, v)
> cor(vvv)
  v v v
v 1 1 1
v 1 1 1
v 1 1 1


I am calculating squared exponential kernel as seen here.
http://mlg.eng.cam.ac.uk/duvenaud/cookbook/index.html

Thanks a bunch,

Mike

        [[alternative HTML version deleted]]

______________________________________________
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.

Reply via email to