An embedded and charset-unspecified text was scrubbed... Name: not available URL: <https://stat.ethz.ch/pipermail/r-help/attachments/20110624/afa9e3e7/attachment.pl>
gaoshan
3 messages · wang peter, Mike Miller, David Winsemius
On Fri, 24 Jun 2011, wang peter wrote:
aa file is? x 1 NA 2 y 1 NA 3 and r program is
aa<-read.table("aa",row.names=1)
bb<-cor(t(aa),method = "pearson",use="pairwise.complete.obs")
bb
x y x 1 1 y 1 1 i am confused why the pearson correlation coefficients between x and y is 1
You have two paired observations. Plot the points and draw the regression line. Every point is on the line (there are only two points). The correlation has to be 1. Mike
On Jun 24, 2011, at 1:58 PM, wang peter wrote:
aa file is? x 1 NA 2 y 1 NA 3 and r program is
aa<-read.table("aa",row.names=1)
bb<-cor(t(aa),method = "pearson",use="pairwise.complete.obs")
bb
x y x 1 1 y 1 1 i am confused why the pearson correlation coefficients between x and y is 1
Because two points determine a line?
David Winsemius, MD West Hartford, CT