{"id":436,"date":"2019-07-08T21:01:18","date_gmt":"2019-07-08T12:01:18","guid":{"rendered":"https:\/\/best-biostatistics.com\/toukei-er\/entry\/hierarchical-clustering-in-r\/"},"modified":"2024-10-10T08:26:56","modified_gmt":"2024-10-09T23:26:56","slug":"hierarchical-clustering-in-r","status":"publish","type":"post","link":"https:\/\/best-biostatistics.com\/toukei-er\/entry\/hierarchical-clustering-in-r\/","title":{"rendered":"R \u3067\u968e\u5c64\u7684\u30af\u30e9\u30b9\u30bf\u30ea\u30f3\u30b0\u3092\u884c\u3046\u65b9\u6cd5"},"content":{"rendered":"\n<p>R \u3067\u968e\u5c64\u7684\u30af\u30e9\u30b9\u30bf\u30ea\u30f3\u30b0\u3092\u884c\u3046\u65b9\u6cd5\u3002<\/p>\n\n\n\n<!--more-->\n\n\n\n<h2 class=\"wp-block-heading\" id=\"\u968e\u5c64\u7684\u30af\u30e9\u30b9\u30bf\u30ea\u30f3\u30b0\u3068\u306f\">\u968e\u5c64\u7684\u30af\u30e9\u30b9\u30bf\u30ea\u30f3\u30b0\u3068\u306f<\/h2>\n\n\n\n<p>\u3055\u307e\u3056\u307e\u306a\u7279\u5fb4\u3092\u6301\u3063\u305f\u96c6\u56e3\u3001\u305f\u3068\u3048\u3070\u7c73\u56fd50\u5dde\u3092\u3001\u7279\u5fb4\u304c\u4f3c\u3066\u3044\u308b\u4f3c\u3066\u3044\u306a\u3044\u3067\u8fd1\u3044\u30fb\u9060\u3044\u3092\u8868\u73fe\u3057\u3066\u90e8\u5206\u96c6\u56e3\uff08\u30af\u30e9\u30b9\u30bf\u30fc\uff09\u306b\u5206\u3051\u308b\u3053\u3068\u3092\u8a00\u3046\u3002<\/p>\n\n\n\n<p>\u4ee5\u4e0b\u3082\u53c2\u7167\u306e\u3053\u3068\u3002<\/p>\n\n\n<div class=\"swell-block-postLink\">\t\t\t<div class=\"p-blogCard -internal\" data-type=\"type1\" data-onclick=\"clickLink\">\n\t\t\t\t<div class=\"p-blogCard__inner\">\n\t\t\t\t\t<span class=\"p-blogCard__caption\">\u3042\u308f\u305b\u3066\u8aad\u307f\u305f\u3044<\/span>\n\t\t\t\t\t<div class=\"p-blogCard__thumb c-postThumb\"><figure class=\"c-postThumb__figure\"><img decoding=\"async\" src=\"https:\/\/best-biostatistics.com\/toukei-er\/wp-content\/uploads\/2024\/08\/1920x1080-video-Excel-300x169.jpg\" alt=\"\" class=\"c-postThumb__img u-obf-cover\" width=\"320\" height=\"180\"><\/figure><\/div>\t\t\t\t\t<div class=\"p-blogCard__body\">\n\t\t\t\t\t\t<a class=\"p-blogCard__title\" href=\"https:\/\/best-biostatistics.com\/toukei-er\/entry\/what-is-clustering\/\">\u30af\u30e9\u30b9\u30bf\u30fc\u5206\u6790\u3068\u306f\uff1f<\/a>\n\t\t\t\t\t\t<span class=\"p-blogCard__excerpt\">\u30af\u30e9\u30b9\u30bf\u30fc\u5206\u6790\u3068\u306f\u4f55\u304b\uff1f \u305d\u3082\u305d\u3082\u3001\u30af\u30e9\u30b9\u30bf\u30fc\u3063\u3066\u4f55\uff1f \u30af\u30e9\u30b9\u30bf\u30fc\u3068\u306f\uff1f \u30af\u30e9\u30b9\u30bf\u30fc\u3068\u306f\u3001\u30b0\u30eb\u30fc\u30d7\u3068\u304b\u584a\uff08\u304b\u305f\u307e\u308a\uff09\u306e\u610f\u5473\u3002 \u30c7\u30fc\u30bf\u3092\u3044\u304f\u3064\u304b\u306e\u584a\u306b\u5206\u3051\u305f\u3082\u306e\u3092&#8230;<\/span>\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t<\/div>\n\t\t<\/div>\n\n\n<h2 class=\"wp-block-heading\" id=\"\u968e\u5c64\u7684\u30af\u30e9\u30b9\u30bf\u30ea\u30f3\u30b0\u306e\u30b5\u30f3\u30d7\u30eb\u30c7\u30fc\u30bf\">\u968e\u5c64\u7684\u30af\u30e9\u30b9\u30bf\u30ea\u30f3\u30b0\u306e\u30b5\u30f3\u30d7\u30eb\u30c7\u30fc\u30bf<\/h2>\n\n\n\n<p>\u968e\u5c64\u578b\u30af\u30e9\u30b9\u30bf\u30ea\u30f3\u30b0\u3092\u4f8b\u793a\u3057\u3066\u307f\u308b\u30b5\u30f3\u30d7\u30eb\u30c7\u30fc\u30bf\u306fUSArrests\u3068\u3044\u3046\u30c7\u30fc\u30bf\u3067\u30011973\u5e74\u5f53\u6642\u306e\u7c73\u56fd\u72af\u7f6a\u30c7\u30fc\u30bf\u3002<\/p>\n\n\n\n<p>\u5148\u982d\u90e8\u5206\u3060\u3051\u5c11\u3057\u898b\u3066\u307f\u308b\u3002<\/p>\n\n\n\n<p>\u5404\u5dde\u306e Murder, Assault, UrbanPop, Rape \u306e\u30c7\u30fc\u30bf\u304c\u683c\u7d0d\u3055\u308c\u3066\u3044\u308b\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code><span class=\"synStatement\">&gt;<\/span> <span class=\"synIdentifier\">head<\/span><span class=\"synSpecial\">(<\/span>USArrests<span class=\"synSpecial\">)<\/span>\nMurder Assault UrbanPop Rape\nAlabama      <span class=\"synConstant\">13.2<\/span>     <span class=\"synConstant\">236<\/span>       <span class=\"synConstant\">58<\/span> <span class=\"synConstant\">21.2<\/span>\nAlaska       <span class=\"synConstant\">10.0<\/span>     <span class=\"synConstant\">263<\/span>       <span class=\"synConstant\">48<\/span> <span class=\"synConstant\">44.5<\/span>\nArizona       <span class=\"synConstant\">8.1<\/span>     <span class=\"synConstant\">294<\/span>       <span class=\"synConstant\">80<\/span> <span class=\"synConstant\">31.0<\/span>\nArkansas      <span class=\"synConstant\">8.8<\/span>     <span class=\"synConstant\">190<\/span>       <span class=\"synConstant\">50<\/span> <span class=\"synConstant\">19.5<\/span>\nCalifornia    <span class=\"synConstant\">9.0<\/span>     <span class=\"synConstant\">276<\/span>       <span class=\"synConstant\">91<\/span> <span class=\"synConstant\">40.6<\/span>\nColorado      <span class=\"synConstant\">7.9<\/span>     <span class=\"synConstant\">204<\/span>       <span class=\"synConstant\">78<\/span> <span class=\"synConstant\">38.7<\/span>\n<\/code><\/pre>\n\n\n\n<div id=\"biost-764109043\" class=\"biost- biost-entity-placement\"><p style=\"text-align: center;\"><span style=\"font-size: 20px;\"><strong><a href=\"https:\/\/best-biostatistics.com\/kmhl\">\uff1e\uff1e\u3082\u3046\u7d71\u8a08\u3067\u60a9\u3080\u306e\u306f\u7d42\u308f\u308a\u306b\u3057\u307e\u305b\u3093\u304b\uff1f\u00a0<\/a><\/strong><\/span><\/p>\r\n<a href=\"https:\/\/best-biostatistics.com\/kmhl\"><img class=\"aligncenter wp-image-2794 size-full\" src=\"https:\/\/best-biostatistics.com\/wp\/wp-content\/uploads\/2023\/11\/bn_r_03.png\" alt=\"\" width=\"500\" height=\"327\" \/><\/a>\r\n<p style=\"text-align: center;\"><span style=\"color: #ff0000; font-size: 20px;\"><strong><span class=\"marker2\">\u21911\u4e07\u4eba\u4ee5\u4e0a\u306e\u533b\u7642\u5f93\u4e8b\u8005\u304c\u8cfc\u8aad\u4e2d<\/span><\/strong><\/span><\/p><\/div><h2 class=\"wp-block-heading\" id=\"\u968e\u5c64\u7684\u30af\u30e9\u30b9\u30bf\u30ea\u30f3\u30b0\u306f\u5b9f\u969b\u306b\u3069\u3046\u3059\u308b\u304b\">\u968e\u5c64\u7684\u30af\u30e9\u30b9\u30bf\u30ea\u30f3\u30b0\u306f\u5b9f\u969b\u306b\u3069\u3046\u3059\u308b\u304b\uff1f<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"\u307e\u305a\u8ddd\u96e2\u8a08\u7b97\u3092\u3059\u308b\">\u307e\u305a\u8ddd\u96e2\u8a08\u7b97\u3092\u3059\u308b<\/h3>\n\n\n\n<p>\u307e\u305a\u3001\u5dde\u540c\u58eb\u306e\u8ddd\u96e2\u8a08\u7b97\u3092\u3059\u308b\u3002<\/p>\n\n\n\n<p>dist()\u3068\u3044\u3046\u95a2\u6570\u3092\u4f7f\u3046\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code><span class=\"synStatement\">&gt;<\/span> dist1 <span class=\"synStatement\">&lt;-<\/span> <span class=\"synIdentifier\">dist<\/span><span class=\"synSpecial\">(<\/span>USArrests<span class=\"synSpecial\">)<\/span>\n<span class=\"synStatement\">&gt;<\/span> dist1\nAlabama     Alaska    Arizona   Arkansas\nAlaska          <span class=\"synConstant\">37.177009<\/span>\nArizona         <span class=\"synConstant\">63.008333<\/span>  <span class=\"synConstant\">46.592489<\/span>\nArkansas        <span class=\"synConstant\">46.928137<\/span>  <span class=\"synConstant\">77.197409<\/span> <span class=\"synConstant\">108.851918<\/span>\nCalifornia      <span class=\"synConstant\">55.524769<\/span>  <span class=\"synConstant\">45.102217<\/span>  <span class=\"synConstant\">23.194180<\/span>  <span class=\"synConstant\">97.582017<\/span>\nColorado        <span class=\"synConstant\">41.932565<\/span>  <span class=\"synConstant\">66.475935<\/span>  <span class=\"synConstant\">90.351148<\/span>  <span class=\"synConstant\">36.734861<\/span>\nConnecticut    <span class=\"synConstant\">128.206942<\/span> <span class=\"synConstant\">159.406556<\/span> <span class=\"synConstant\">185.159526<\/span>  <span class=\"synConstant\">85.028289<\/span>\nDelaware        <span class=\"synConstant\">16.806249<\/span>  <span class=\"synConstant\">45.182961<\/span>  <span class=\"synConstant\">58.616380<\/span>  <span class=\"synConstant\">53.010376<\/span>\nFlorida        <span class=\"synConstant\">102.001618<\/span>  <span class=\"synConstant\">79.974496<\/span>  <span class=\"synConstant\">41.654532<\/span> <span class=\"synConstant\">148.735739<\/span>\nGeorgia         <span class=\"synConstant\">25.841827<\/span>  <span class=\"synConstant\">57.030255<\/span>  <span class=\"synConstant\">86.037957<\/span>  <span class=\"synConstant\">25.586129<\/span>\nHawaii         <span class=\"synConstant\">191.803050<\/span> <span class=\"synConstant\">221.193535<\/span> <span class=\"synConstant\">248.268967<\/span> <span class=\"synConstant\">147.775979<\/span>\nIdaho          <span class=\"synConstant\">116.761980<\/span> <span class=\"synConstant\">146.484982<\/span> <span class=\"synConstant\">176.817674<\/span>  <span class=\"synConstant\">70.587038<\/span>\n<\/code><\/pre>\n\n\n\n<p>\u9014\u4e2d\u3067\u5272\u611b\u3059\u308b\u304c\u3001\u4e0a\u8a18\u306e\u3088\u3046\u306a\u884c\u5217\u304c\u300149\u884c\u00d750\u5217\u7d9a\u304f\u3002<\/p>\n\n\n\n<p>\u3053\u308c\u304c\u8ddd\u96e2\u884c\u5217\u3060\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"\u6b21\u306b\u30af\u30e9\u30b9\u30bf\u30fc\u306b\u5206\u3051\u308b\">\u6b21\u306b\u30af\u30e9\u30b9\u30bf\u30fc\u306b\u5206\u3051\u308b<\/h3>\n\n\n\n<p>\u6b21\u306b\u30af\u30e9\u30b9\u30bf\u30fc\u306b\u5206\u3051\u308b\u3002<\/p>\n\n\n\n<p>hclust()\u3068\u3044\u3046\u95a2\u6570\u3092\u4f7f\u3046\u3002<\/p>\n\n\n\n<p>\u30af\u30e9\u30b9\u30bf\u30fc\u306b\u5206\u3051\u308b\u65b9\u6cd5\u306f\u3044\u304f\u3064\u304b\u3042\u308b\u3002<\/p>\n\n\n\n<p>R \u306e\u30c7\u30d5\u30a9\u30eb\u30c8\u3067\u306fcomplete\uff08\u5b8c\u5168\u30ea\u30f3\u30af\u6cd5\uff09\u304c\u7528\u3044\u3089\u308c\u3066\u3044\u308b\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code><span class=\"synStatement\">&gt;<\/span> hclust1 <span class=\"synStatement\">&lt;-<\/span> <span class=\"synIdentifier\">hclust<\/span><span class=\"synSpecial\">(<\/span>dist1<span class=\"synSpecial\">)<\/span>\n<span class=\"synStatement\">&gt;<\/span> hclust1\nCall<span class=\"synSpecial\">:<\/span>\n<span class=\"synIdentifier\">hclust<\/span><span class=\"synSpecial\">(<\/span>d <span class=\"synStatement\">=<\/span> dist1<span class=\"synSpecial\">)<\/span>\nCluster method   <span class=\"synSpecial\">:<\/span> complete\nDistance         <span class=\"synSpecial\">:<\/span> euclidean\nNumber of objects<span class=\"synSpecial\">:<\/span> <span class=\"synConstant\">50<\/span>\n<\/code><\/pre>\n\n\n\n<p>\u5b8c\u5168\u30ea\u30f3\u30af\u6cd5\u306f\u3001\u6700\u3082\u8fd1\u3044\u8005\u540c\u58eb\u304c\u30da\u30a2\u3092\u4f5c\u3063\u305f\u5f8c\u3001\u305d\u306e\u3069\u3061\u3089\u304b\u3068\u9060\u3044\u307b\u3046\u306e\u8ddd\u96e2\u3092\u63a1\u7528\u3057\u3066\uff0850\u5dde\u306e\u5834\u5408\u306a\u308948\u500b\u8ddd\u96e2\u304c\u9078\u3070\u308c\u308b\uff09\u3001\u305d\u306e\u4e2d\u3067\u6700\u3082\u8fd1\u3044\u8005\u304c\u6b21\u306e\u30ec\u30d9\u30eb\u306e\u30af\u30e9\u30b9\u30bf\u30fc\u306b\u306a\u308b\u3002<\/p>\n\n\n\n<p>\u8a73\u3057\u304f\u306f\u4ee5\u4e0b\u306e\u30ea\u30f3\u30af\u5148\u3092\u53c2\u7167\u3002<\/p>\n\n\n\n<p>\u30af\u30e9\u30b9\u30bf\u30ea\u30f3\u30b0\uff08\u30b9\u30e9\u30a4\u30c921\u679a\u76ee\uff09<\/p>\n\n\n\n<p><a href=\"http:\/\/www.kamishima.net\/archive\/clustering.pdf\">http:\/\/www.kamishima.net\/archive\/clustering.pdf<\/a><\/p>\n\n\n\n<p>\u3053\u3061\u3089\u3082\u308f\u304b\u308a\u3084\u3059\u3044\u8aac\u660e\u3002<\/p>\n\n\n\n<p><a href=\"https:\/\/it-mint.com\/2017\/07\/13\/hierarchical-clustering-complete-linkage-1203.html\">https:\/\/it-mint.com\/2017\/07\/13\/hierarchical-clustering-complete-linkage-1203.html<\/a><\/p>\n\n\n\n\n\n\n\n<h3 class=\"wp-block-heading\" id=\"\u8ddd\u96e2\u8a08\u7b97\u306f\u30e6\u30fc\u30af\u30ea\u30c3\u30c9\u8ddd\u96e2\u3092\u7528\u3044\u3066\u3044\u308b\">\u8ddd\u96e2\u8a08\u7b97\u306f\u30e6\u30fc\u30af\u30ea\u30c3\u30c9\u8ddd\u96e2\u3092\u7528\u3044\u3066\u3044\u308b<\/h3>\n\n\n\n<p>\u30e6\u30fc\u30af\u30ea\u30c3\u30c9\u8ddd\u96e2 euclidean distance\u306f\u3001\u4e8c\u3064\u306e\u70b9\u306e\u300c\u5dee\u306e\u4e8c\u4e57\u548c\u306e\u5e73\u65b9\u6839\u300d\u3060\u3002<\/p>\n\n\n\n<p>\u5b9f\u969b\u306e\u8a08\u7b97\u306f\u4ee5\u4e0b\u3092\u53c2\u7167\u3002<\/p>\n\n\n<div class=\"swell-block-postLink\">\t\t\t<div class=\"p-blogCard -internal\" data-type=\"type1\" data-onclick=\"clickLink\">\n\t\t\t\t<div class=\"p-blogCard__inner\">\n\t\t\t\t\t<span class=\"p-blogCard__caption\">\u3042\u308f\u305b\u3066\u8aad\u307f\u305f\u3044<\/span>\n\t\t\t\t\t<div class=\"p-blogCard__thumb c-postThumb\"><figure class=\"c-postThumb__figure\"><img decoding=\"async\" src=\"https:\/\/best-biostatistics.com\/toukei-er\/wp-content\/uploads\/2024\/08\/1920x1080-video-Excel-300x169.jpg\" alt=\"\" class=\"c-postThumb__img u-obf-cover\" width=\"320\" height=\"180\"><\/figure><\/div>\t\t\t\t\t<div class=\"p-blogCard__body\">\n\t\t\t\t\t\t<a class=\"p-blogCard__title\" href=\"https:\/\/best-biostatistics.com\/toukei-er\/entry\/how-to-calculate-euclidean-distance-in-r\/\">R \u3067\u30e6\u30fc\u30af\u30ea\u30c3\u30c9\u8ddd\u96e2\u3092\u6c42\u3081\u308b\u65b9\u6cd5<\/a>\n\t\t\t\t\t\t<span class=\"p-blogCard__excerpt\">\u30e6\u30fc\u30af\u30ea\u30c3\u30c9\u306f\u7d00\u5143\u524d325\u5e74\u306b\u751f\u307e\u308c\u305f\u30ae\u30ea\u30b7\u30e3\u306e\u6570\u5b66\u8005\u3002 \u8457\u3057\u305f\u8457\u66f8\u306f\u6570\u5b66\u306e\u306a\u304b\u3067\u3082\u7279\u306b\u5e7e\u4f55\u5b66\u306e\u6559\u79d1\u66f8\u3068\u3057\u3066\u6709\u540d\u3067\u3042\u3063\u305f\u3002 \u30e6\u30fc\u30af\u30ea\u30c3\u30c9\u304c\u8003\u3048\u51fa\u3057\u305f\u300c\u8ddd\u96e2\u300d\u3068\u306f\uff1f&#8230;<\/span>\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t<\/div>\n\t\t<\/div>\n\n<div class=\"swell-block-postLink\">\t\t\t<div class=\"p-blogCard -internal\" data-type=\"type1\" data-onclick=\"clickLink\">\n\t\t\t\t<div class=\"p-blogCard__inner\">\n\t\t\t\t\t<span class=\"p-blogCard__caption\">\u3042\u308f\u305b\u3066\u8aad\u307f\u305f\u3044<\/span>\n\t\t\t\t\t<div class=\"p-blogCard__thumb c-postThumb\"><figure class=\"c-postThumb__figure\"><img decoding=\"async\" src=\"https:\/\/best-biostatistics.com\/toukei-er\/wp-content\/uploads\/2019\/07\/20190707190413-300x298.png\" alt=\"\" class=\"c-postThumb__img u-obf-cover\" width=\"320\" height=\"180\"><\/figure><\/div>\t\t\t\t\t<div class=\"p-blogCard__body\">\n\t\t\t\t\t\t<a class=\"p-blogCard__title\" href=\"https:\/\/best-biostatistics.com\/toukei-er\/entry\/how-to-draw-euclidean-distance-in-r\/\">R \u3067\u30e6\u30fc\u30af\u30ea\u30c3\u30c9\u8ddd\u96e2\u3092\u4e8c\u6b21\u5143\u3067\u8868\u793a\u3057\u3066\u307f\u305f<\/a>\n\t\t\t\t\t\t<span class=\"p-blogCard__excerpt\">\u4e8c\u6b21\u5143\u3067\u30e6\u30fc\u30af\u30ea\u30c3\u30c9\u8ddd\u96e2\u3092\u56f3\u793a\u3057\u3066\u307f\u305f\u3002 \u4e8c\u6b21\u5143\u306e\u30e6\u30fc\u30af\u30ea\u30c3\u30c9\u8ddd\u96e2\u3092\u793a\u3059\u30b5\u30f3\u30d7\u30eb\u30c7\u30fc\u30bf \u4e8c\u6b21\u5143\u3067\u30e6\u30fc\u30af\u30ea\u30c3\u30c9\u8ddd\u96e2\u3092\u4f8b\u793a\u3057\u3066\u307f\u308b\u305f\u3081\u306e\u30b5\u30f3\u30d7\u30eb\u30c7\u30fc\u30bf\u306f\u3001R \u306b\u7d44\u307f&#8230;<\/span>\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t<\/div>\n\t\t<\/div>\n\n\n<h2 class=\"wp-block-heading\" id=\"\u968e\u5c64\u7684\u30af\u30e9\u30b9\u30bf\u30ea\u30f3\u30b0\u306e\u56f3\u793a\">\u968e\u5c64\u7684\u30af\u30e9\u30b9\u30bf\u30ea\u30f3\u30b0\u306e\u56f3\u793a<\/h2>\n\n\n\n<p>\u5404\u70b9\uff08\u4f8b\u3067\u306f\u5404\u5dde\uff09\u304c\u8fd1\u3044\u306e\u304b\u3001\u9060\u3044\u306e\u304b\u3092\u8868\u793a\u3059\u308b\u56f3\u304c\u3042\u308b\u3002<\/p>\n\n\n\n<p>\u30c7\u30f3\u30c9\u30ed\u30b0\u30e9\u30e0\u3068\u547c\u3070\u308c\u308b\u3002<\/p>\n\n\n\n<p>\u65e5\u672c\u8a9e\u3067\u306f\u6a39\u5f62\u56f3\u3068\u304b\u6a39\u72b6\u56f3\u3068\u547c\u3070\u308c\u308b\u3002<\/p>\n\n\n\n<p>\u3084\u306f\u308a\u56f3\u306f\u308f\u304b\u308a\u3084\u3059\u3044\u3002<\/p>\n\n\n\n<p>\u30c7\u30d5\u30a9\u30eb\u30c8\u3067\u306f\u540d\u524d\u304c\u4e0a\u4e0b\u3057\u3066\u540c\u3058\u30ec\u30d9\u30eb\u304b\u9055\u3046\u30ec\u30d9\u30eb\u304b\u304c\u76ee\u8996\u3067\u308f\u304b\u308b\u3088\u3046\u306b\u306a\u3063\u3066\u3044\u308b\u3002<\/p>\n\n\n\n<p>hang=-1\u3068\u30aa\u30d7\u30b7\u30e7\u30f3\u6307\u5b9a\u3059\u308b\u3068\u3001\u5404\u5dde\u306e\u540d\u524d\u304c\u6a2a\u4e00\u7dda\u306b\u4e26\u3076\u8868\u793a\u306b\u306a\u308b\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code><span class=\"synIdentifier\">plot<\/span><span class=\"synSpecial\">(<\/span>hclust1<span class=\"synSpecial\">)<\/span>\n<span class=\"synIdentifier\">plot<\/span><span class=\"synSpecial\">(<\/span>hclust1<span class=\"synSpecial\">,<\/span>hang<span class=\"synStatement\">=-<\/span><span class=\"synConstant\">1<\/span><span class=\"synSpecial\">)<\/span>\n<\/code><\/pre>\n\n\n\n<p>\u30c7\u30d5\u30a9\u30eb\u30c8\u306e\u8868\u793a<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" width=\"1024\" height=\"514\" src=\"https:\/\/best-biostatistics.com\/toukei-er\/wp-content\/uploads\/2019\/07\/20190708205412-1024x514.png\" alt=\"\" class=\"wp-image-2617\" title=\"\" srcset=\"https:\/\/best-biostatistics.com\/toukei-er\/wp-content\/uploads\/2019\/07\/20190708205412-1024x514.png 1024w, https:\/\/best-biostatistics.com\/toukei-er\/wp-content\/uploads\/2019\/07\/20190708205412-300x151.png 300w, https:\/\/best-biostatistics.com\/toukei-er\/wp-content\/uploads\/2019\/07\/20190708205412-768x385.png 768w, https:\/\/best-biostatistics.com\/toukei-er\/wp-content\/uploads\/2019\/07\/20190708205412.png 1200w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p><span itemscope=\"\" itemtype=\"http:\/\/schema.org\/Photograph\"><\/span><\/p>\n\n\n\n<p>hang=-1\u3092\u6307\u5b9a\u3057\u305f\u6642\u306e\u8868\u793a<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" width=\"1024\" height=\"514\" src=\"https:\/\/best-biostatistics.com\/toukei-er\/wp-content\/uploads\/2019\/07\/20190708205428-1024x514.png\" alt=\"\" class=\"wp-image-2618\" title=\"\" srcset=\"https:\/\/best-biostatistics.com\/toukei-er\/wp-content\/uploads\/2019\/07\/20190708205428-1024x514.png 1024w, https:\/\/best-biostatistics.com\/toukei-er\/wp-content\/uploads\/2019\/07\/20190708205428-300x151.png 300w, https:\/\/best-biostatistics.com\/toukei-er\/wp-content\/uploads\/2019\/07\/20190708205428-768x385.png 768w, https:\/\/best-biostatistics.com\/toukei-er\/wp-content\/uploads\/2019\/07\/20190708205428.png 1200w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p><span itemscope=\"\" itemtype=\"http:\/\/schema.org\/Photograph\"><\/span><\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"\u5b9f\u969b\u306e\u30e6\u30fc\u30af\u30ea\u30c3\u30c9\u8ddd\u96e2\u3092\u8a08\u7b97\u3057\u3066\u307f\u308b\">\u5b9f\u969b\u306e\u30e6\u30fc\u30af\u30ea\u30c3\u30c9\u8ddd\u96e2\u3092\u8a08\u7b97\u3057\u3066\u307f\u308b<\/h2>\n\n\n\n<p>\u4f8b\u3068\u3057\u3066Alabama\u3068Alaska\u3001Alabama\u3068Arizona\u306e\u8ddd\u96e2\u3092\u8a08\u7b97\u3057\u3066\u307f\u308b\u3068\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u306a\u308b\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code><span class=\"synStatement\">&gt;<\/span> <span class=\"synIdentifier\">head<\/span><span class=\"synSpecial\">(<\/span>USArrests<span class=\"synSpecial\">)<\/span>\nMurder Assault UrbanPop Rape\nAlabama      <span class=\"synConstant\">13.2<\/span>     <span class=\"synConstant\">236<\/span>       <span class=\"synConstant\">58<\/span> <span class=\"synConstant\">21.2<\/span>\nAlaska       <span class=\"synConstant\">10.0<\/span>     <span class=\"synConstant\">263<\/span>       <span class=\"synConstant\">48<\/span> <span class=\"synConstant\">44.5<\/span>\nArizona       <span class=\"synConstant\">8.1<\/span>     <span class=\"synConstant\">294<\/span>       <span class=\"synConstant\">80<\/span> <span class=\"synConstant\">31.0<\/span>\nArkansas      <span class=\"synConstant\">8.8<\/span>     <span class=\"synConstant\">190<\/span>       <span class=\"synConstant\">50<\/span> <span class=\"synConstant\">19.5<\/span>\nCalifornia    <span class=\"synConstant\">9.0<\/span>     <span class=\"synConstant\">276<\/span>       <span class=\"synConstant\">91<\/span> <span class=\"synConstant\">40.6<\/span>\nColorado      <span class=\"synConstant\">7.9<\/span>     <span class=\"synConstant\">204<\/span>       <span class=\"synConstant\">78<\/span> <span class=\"synConstant\">38.7<\/span>\n<span class=\"synStatement\">&gt;<\/span>\n<span class=\"synStatement\">&gt;<\/span> <span class=\"synComment\">#Alabama to Alaska<\/span>\n<span class=\"synStatement\">&gt;<\/span> <span class=\"synIdentifier\">sqrt<\/span><span class=\"synSpecial\">(<\/span><span class=\"synIdentifier\">sum<\/span><span class=\"synSpecial\">((<\/span>USArrests<span class=\"synSpecial\">&#91;<\/span><span class=\"synIdentifier\">c<\/span><span class=\"synSpecial\">(<\/span><span class=\"synConstant\">1<\/span><span class=\"synSpecial\">,<\/span><span class=\"synConstant\">2<\/span><span class=\"synSpecial\">),]&#91;<\/span><span class=\"synConstant\">1<\/span><span class=\"synSpecial\">,]<\/span><span class=\"synStatement\">-<\/span>USArrests<span class=\"synSpecial\">&#91;<\/span><span class=\"synIdentifier\">c<\/span><span class=\"synSpecial\">(<\/span><span class=\"synConstant\">1<\/span><span class=\"synSpecial\">,<\/span><span class=\"synConstant\">2<\/span><span class=\"synSpecial\">),]&#91;<\/span><span class=\"synConstant\">2<\/span><span class=\"synSpecial\">,])<\/span><span class=\"synStatement\">^<\/span><span class=\"synConstant\">2<\/span><span class=\"synSpecial\">))<\/span>\n<span class=\"synSpecial\">&#91;<\/span><span class=\"synConstant\">1<\/span><span class=\"synSpecial\">]<\/span> <span class=\"synConstant\">37.17701<\/span>\n<span class=\"synStatement\">&gt;<\/span> <span class=\"synComment\">#Alabama to Arizona<\/span>\n<span class=\"synStatement\">&gt;<\/span> <span class=\"synIdentifier\">sqrt<\/span><span class=\"synSpecial\">(<\/span><span class=\"synIdentifier\">sum<\/span><span class=\"synSpecial\">((<\/span>USArrests<span class=\"synSpecial\">&#91;<\/span><span class=\"synIdentifier\">c<\/span><span class=\"synSpecial\">(<\/span><span class=\"synConstant\">1<\/span><span class=\"synSpecial\">,<\/span><span class=\"synConstant\">3<\/span><span class=\"synSpecial\">),]&#91;<\/span><span class=\"synConstant\">1<\/span><span class=\"synSpecial\">,]<\/span><span class=\"synStatement\">-<\/span>USArrests<span class=\"synSpecial\">&#91;<\/span><span class=\"synIdentifier\">c<\/span><span class=\"synSpecial\">(<\/span><span class=\"synConstant\">1<\/span><span class=\"synSpecial\">,<\/span><span class=\"synConstant\">3<\/span><span class=\"synSpecial\">),]&#91;<\/span><span class=\"synConstant\">2<\/span><span class=\"synSpecial\">,])<\/span><span class=\"synStatement\">^<\/span><span class=\"synConstant\">2<\/span><span class=\"synSpecial\">))<\/span>\n<span class=\"synSpecial\">&#91;<\/span><span class=\"synConstant\">1<\/span><span class=\"synSpecial\">]<\/span> <span class=\"synConstant\">63.00833<\/span>\n<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"\u30e6\u30fc\u30af\u30ea\u30c3\u30c9\u8ddd\u96e2\u304c\u6700\u3082\u8fd1\u3044\u5dde\u6700\u3082\u9060\u3044\u5dde\u306f\">\u30e6\u30fc\u30af\u30ea\u30c3\u30c9\u8ddd\u96e2\u304c\u6700\u3082\u8fd1\u3044\u5dde\u3001\u6700\u3082\u9060\u3044\u5dde\u306f\uff1f<\/h2>\n\n\n\n<p>\u4f8b\u3068\u3057\u3066Alabama\u304b\u3089\u30e6\u30fc\u30af\u30ea\u30c3\u30c9\u8ddd\u96e2\u304c\u6700\u3082\u8fd1\u3044\u5dde\u3068\u6700\u3082\u9060\u3044\u5dde\u3092\u898b\u3066\u307f\u308b\u3002<\/p>\n\n\n\n<p>\u307e\u305a\u3001Alabama\u304b\u3089\u305d\u308c\u305e\u308c\u306e\u5dde\u307e\u3067\u306e\u8ddd\u96e2\u3092\u8a08\u7b97\u3059\u308b\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>> alabama\n        Alaska        Arizona       Arkansas     California       Colorado \n      37.17701       63.00833       46.92814       55.52477       41.93256 \n   Connecticut       Delaware        Florida        Georgia         Hawaii \n     128.20694       16.80625      102.00162       25.84183      191.80305 \n         Idaho       Illinois        Indiana           Iowa         Kansas \n     116.76198       28.45488      123.34521      180.61010      121.51987 \n      Kentucky      Louisiana          Maine       Maryland  Massachusetts \n     127.28417       15.45445      154.14529       64.99362       91.64851 \n      Michigan      Minnesota    Mississippi       Missouri        Montana \n      28.48543      164.65096       27.39014       59.78829      127.39262 \n      Nebraska         Nevada  New Hampshire     New Jersey     New Mexico \n     134.43697       37.43047      179.73620       83.24302       51.64349 \n      New York North Carolina   North Dakota           Ohio       Oklahoma \n      33.71083      101.96102      192.41614      117.38761       85.84870 \n        Oregon   Pennsylvania   Rhode Island South Carolina   South Dakota \n      78.38686      131.08509       70.33811       44.18292      151.08911 \n     Tennessee          Texas           Utah        Vermont       Virginia \n      48.34760       41.56609      118.50270      190.37069       80.29533 \n    Washington  West Virginia      Wisconsin        Wyoming \n      92.82047      156.79241      183.77573       75.50709 \n<\/code><\/pre>\n\n\n\n<p>\u3053\u306e\u4e2d\u3067\u6700\u3082\u8fd1\u3044\uff08\u8ddd\u96e2\u304c\u5c0f\u3055\u3044\uff09\u5dde\u3068\u6700\u3082\u9060\u3044\uff08\u8ddd\u96e2\u304c\u5927\u304d\u3044\uff09\u5dde\u3092\u898b\u3064\u3051\u3066\u307f\u308b\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code><span class=\"synStatement\">&gt;<\/span> <span class=\"synIdentifier\">min<\/span><span class=\"synSpecial\">(<\/span>alabama<span class=\"synSpecial\">)<\/span>\n<span class=\"synSpecial\">&#91;<\/span><span class=\"synConstant\">1<\/span><span class=\"synSpecial\">]<\/span> <span class=\"synConstant\">15.45445<\/span>\n<span class=\"synStatement\">&gt;<\/span> <span class=\"synIdentifier\">max<\/span><span class=\"synSpecial\">(<\/span>alabama<span class=\"synSpecial\">)<\/span>\n<span class=\"synSpecial\">&#91;<\/span><span class=\"synConstant\">1<\/span><span class=\"synSpecial\">]<\/span> <span class=\"synConstant\">192.4161<\/span>\n<\/code><\/pre>\n\n\n\n<p>\u6700\u5c0f\u5024\u306f15.45445\u3067Louisiana\u5dde\u3067\u3042\u3063\u305f\u3002<\/p>\n\n\n\n<p>\u6700\u5927\u5024\u306f192.4161\u3067North Dakota\u5dde\u3067\u3042\u3063\u305f\u3002<\/p>\n\n\n\n<p>\u30c7\u30f3\u30c9\u30ed\u30b0\u30e9\u30e0\u3067\u898b\u76f4\u3057\u3066\u307f\u308b\u3068\u3001Louisiana\u306f\u96a3\u306b\u6765\u3066\u3044\u308b\u5dde\u3067\u3001North Dakota\u306f\u9060\u304f\u96e2\u308c\u3066\u3044\u308b\u5834\u6240\u306b\u4f4d\u7f6e\u3057\u3066\u3044\u308b\u3002<\/p>\n\n\n\n<p>\u3053\u306e\u3088\u3046\u306b\u8868\u73fe\u3055\u308c\u308b\u3002<\/p>\n\n\n\n<p>\u3061\u306a\u307f\u306bAlabama\u304b\u3089\u307f\u305f\u7269\u7406\u7684\u306a\u8ddd\u96e2\u3092\u8003\u3048\u3066\u307f\u308b\u3068\u3001Louisiana\u306fMississippi\u3092\u631f\u3093\u3067\u3059\u3050\u8fd1\u304f\u306e\u5dde\u3067\u3042\u308b\u304c\u3001North Dakota\u306f\u9060\u304f\u96e2\u308c\u305f\u4e2d\u897f\u90e8\u6700\u5317\u306e\u5dde\u3067\u3042\u308b\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" width=\"1024\" height=\"514\" src=\"https:\/\/best-biostatistics.com\/toukei-er\/wp-content\/uploads\/2019\/07\/20190708205503-1024x514.png\" alt=\"\" class=\"wp-image-2619\" title=\"\" srcset=\"https:\/\/best-biostatistics.com\/toukei-er\/wp-content\/uploads\/2019\/07\/20190708205503-1024x514.png 1024w, https:\/\/best-biostatistics.com\/toukei-er\/wp-content\/uploads\/2019\/07\/20190708205503-300x151.png 300w, https:\/\/best-biostatistics.com\/toukei-er\/wp-content\/uploads\/2019\/07\/20190708205503-768x385.png 768w, https:\/\/best-biostatistics.com\/toukei-er\/wp-content\/uploads\/2019\/07\/20190708205503.png 1200w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p><span itemscope=\"\" itemtype=\"http:\/\/schema.org\/Photograph\"><\/span><\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"\u307e\u3068\u3081\">\u307e\u3068\u3081<\/h2>\n\n\n\n<p>\u968e\u5c64\u7684\u30af\u30e9\u30b9\u30bf\u30ea\u30f3\u30b0\u306f\u3001\u3044\u304f\u3064\u304b\u306e\u7279\u5fb4\u3092\u7528\u3044\u3066\u3001\u305d\u308c\u3089\u306e\u7279\u5fb4\u3092\u6301\u3064\u70b9\u540c\u58eb\u306e\u8ddd\u96e2\u304c\u8fd1\u3044\u304b\u9060\u3044\u304b\u3092\u4f7f\u3063\u3066\u3001\u584a\uff08\u30af\u30e9\u30b9\u30bf\u30fc\uff09\u3092\u4f5c\u3063\u3066\u3001\u5927\u307e\u304b\u306a\u72b6\u6cc1\u3092\u628a\u63e1\u3059\u308b\u65b9\u6cd5\u3002<\/p>\n\n\n\n<p>\u30c7\u30fc\u30bf\u306e\u5927\u307e\u304b\u306a\u628a\u63e1\u3084\u4eee\u8aac\u69cb\u7bc9\u306b\u6709\u7528\u306a\u624b\u6cd5\u3060\u3002<\/p>\n\n\n\n<p>\u305c\u3072\u304a\u8a66\u3057\u3042\u308c\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"\u53c2\u8003\u30b5\u30a4\u30c8\">\u53c2\u8003\u30b5\u30a4\u30c8<\/h2>\n\n\n\n<p><a href=\"https:\/\/www.kamishima.net\/archive\/clustering.pdf\">\u30af\u30e9\u30b9\u30bf\u30ea\u30f3\u30b0<\/a><\/p>\n\n\n\n<p><a href=\"https:\/\/it-mint.com\/2017\/07\/13\/hierarchical-clustering-complete-linkage-1203.html\">\u300c\u968e\u5c64\u7684\u30af\u30e9\u30b9\u30bf\u30ea\u30f3\u30b0\u300d\u306e\u300c\u5b8c\u5168\u9023\u7d50\u6cd5\uff08Complete Linkage Method\uff09\u300d\u3068\u306f\uff1f\u521d\u5b66\u8005\u306e\u65b9\u3067\u3082\u3001\u308f\u304b\u308a\u3084\u3059\u3044\u3088\u3046\u306b\u307e\u3068\u3081\u307e\u3057\u305f | \u5fd9\u3057\u3044\u3042\u306a\u305f\u306e\u4ee3\u308f\u308a\u306b\u3001\u53f2\u4e0a\u6700\u5f37\u306e\u826f\u3044\u672c\u30fb\u826f\u3044\u66ae\u3089\u3057\u306e\u3054\u63d0\u6848<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>R \u3067\u968e\u5c64\u7684\u30af\u30e9\u30b9\u30bf\u30ea\u30f3\u30b0\u3092\u884c\u3046\u65b9\u6cd5\u3002<\/p>\n","protected":false},"author":2,"featured_media":2619,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"swell_btn_cv_data":"","_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[5,107],"tags":[],"class_list":["post-436","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-r","category-107"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"https:\/\/best-biostatistics.com\/toukei-er\/wp-content\/uploads\/2019\/07\/20190708205503.png","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/best-biostatistics.com\/toukei-er\/wp-json\/wp\/v2\/posts\/436","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/best-biostatistics.com\/toukei-er\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/best-biostatistics.com\/toukei-er\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/best-biostatistics.com\/toukei-er\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/best-biostatistics.com\/toukei-er\/wp-json\/wp\/v2\/comments?post=436"}],"version-history":[{"count":3,"href":"https:\/\/best-biostatistics.com\/toukei-er\/wp-json\/wp\/v2\/posts\/436\/revisions"}],"predecessor-version":[{"id":2621,"href":"https:\/\/best-biostatistics.com\/toukei-er\/wp-json\/wp\/v2\/posts\/436\/revisions\/2621"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/best-biostatistics.com\/toukei-er\/wp-json\/wp\/v2\/media\/2619"}],"wp:attachment":[{"href":"https:\/\/best-biostatistics.com\/toukei-er\/wp-json\/wp\/v2\/media?parent=436"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/best-biostatistics.com\/toukei-er\/wp-json\/wp\/v2\/categories?post=436"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/best-biostatistics.com\/toukei-er\/wp-json\/wp\/v2\/tags?post=436"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}