ç¸é¢ä¿æ°ã¨ç¡ç¸é¢æ¤å® 以ä¸ã®ãã㪠2 çµã®ãã¼ã¿ x ï¼y ã«ç¸é¢ããããã©ããã®æ¤å®ãè¡ãå ´åã¯é¢æ° cor.test() ã使ãï¼ x <- c(70, 72, 62, 64, 71, 76, 60, 65, 74, 72) y <- c(70, 74, 65, 68, 72, 74, 61, 66, 76, 75) ãã®ã¨ãï¼å¼æ° method ã«æ¬¡ã®æååãå ¥ãããã¨ã§æ¤å®æ¹æ³ã代ãããã¨ãåºæ¥ãï¼ "pearson" ï¼ ãã¢ã½ã³ã®ç©çç¸é¢ä¿æ°ã®ç¡ç¸é¢æ¤å®ãè¡ãï¼ "kendall" ï¼ ã±ã³ãã¼ã«ã®é ä½ç¸é¢ä¿æ°ã®ç¡ç¸é¢æ¤å®ãè¡ãï¼ "spearman" ï¼ ã¹ãã¢ãã³ã®é ä½ç¸é¢ä¿æ°ã®ç¡ç¸é¢æ¤å®ãè¡ãï¼ ä¸ã®ãã¼ã¿å½¢å¼ããããã®å ¥åä¾ã§ããï¼ cor(x, y, method="spearman") # åãªãç¸é¢ä¿æ° [1] 0.929878 cor.test(x, y, m
{{#tags}}- {{label}}
{{/tags}}