I'm a little bit confused with how exactly the 'cor' function handles missing values. Should the last two function calls give the same results? Thanks,
...Tao


==========================================
x=rnorm(10)
y=rnorm(10)
x[1]=NA
y[2]=NA
cor(x,y,method="spearman")
[1] -0.006060606

cor(x,y,use="pairwise.complete.obs",method="spearman")
[1] -0.006060606
cor(x[3:10],y[3:10],method="spearman")
[1] 0.1666667
==========================================

_________________________________________________________________
Create a Job Alert on MSN Careers and enter for a chance to win $1000! http://msn.careerbuilder.com/promo/kaday.htm?siteid=CBMSN_1K&sc_extcmp=JS_JASweep_MSNHotm2


______________________________________________
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html

Reply via email to