{"id":2018,"date":"2023-07-24T01:57:10","date_gmt":"2023-07-24T01:57:10","guid":{"rendered":"https:\/\/statorials.org\/nl\/speermancorrelatie-in-r\/"},"modified":"2023-07-24T01:57:10","modified_gmt":"2023-07-24T01:57:10","slug":"speermancorrelatie-in-r","status":"publish","type":"post","link":"https:\/\/statorials.org\/nl\/speermancorrelatie-in-r\/","title":{"rendered":"Hoe de spearman-rangcorrelatie in r te berekenen"},"content":{"rendered":"<p><\/p>\n<hr>\n<p><span style=\"color: #000000;\">In de statistiek verwijst <strong>correlatie<\/strong> naar de sterkte en richting van een verband tussen twee variabelen. De waarde van een correlatieco\u00ebffici\u00ebnt kan vari\u00ebren van -1 tot 1, met de volgende interpretaties:<\/span><\/p>\n<ul>\n<li> <span style=\"color: #000000;\"><strong>-1:<\/strong> een perfect negatief verband tussen twee variabelen<\/span><\/li>\n<li> <span style=\"color: #000000;\"><strong>0:<\/strong> geen verband tussen twee variabelen<\/span><\/li>\n<li> <span style=\"color: #000000;\"><strong>1:<\/strong> een perfecte positieve relatie tussen twee variabelen<\/span><\/li>\n<\/ul>\n<p> <span style=\"color: #000000;\">Een speciaal type correlatie wordt de <strong>rangcorrelatie van Spearman<\/strong> genoemd, die wordt gebruikt om de correlatie tussen twee gerangschikte variabelen te meten. (bijvoorbeeld de rangorde van de wiskunde-examenscore van een leerling in verhouding tot de rangorde van de wetenschapsexamenscore in een klas).<\/span><\/p>\n<p> <span style=\"color: #000000;\">Om de Spearman-rangcorrelatie tussen twee variabelen in R te berekenen, kunnen we de volgende basissyntaxis gebruiken:<\/span><\/p>\n<pre style=\"background-color: #ececec; font-size: 15px;\"> <strong>corr &lt;- cor. <span style=\"color: #3366ff;\">test<\/span> (x, y, method = ' <span style=\"color: #ff0000;\">spearman<\/span> ')\n<\/strong><\/pre>\n<p> <span style=\"color: #000000;\">De volgende voorbeelden laten zien hoe u deze functie in de praktijk kunt gebruiken.<\/span><\/p>\n<h3> <span style=\"color: #000000;\"><strong>Voorbeeld 1: Correlatie van Spearman-rangen tussen vectoren<\/strong><\/span><\/h3>\n<p> <span style=\"color: #000000;\"><span style=\"color: #000000;\">De volgende code laat zien hoe u de Spearman-rangcorrelatie tussen twee vectoren in R kunt berekenen:<\/span><\/span><\/p>\n<pre style=\"background-color: #ececec; font-size: 15px;\"> <span style=\"color: #000000;\"><strong><span style=\"color: #008080;\">#define data\n<\/span>x &lt;- c(70, 78, 90, 87, 84, 86, 91, 74, 83, 85)\ny &lt;- c(90, 94, 79, 86, 84, 83, 88, 92, 76, 75)\n\n<span style=\"color: #008080;\">#calculate Spearman rank correlation between x and y\n<\/span>horn. <span style=\"color: #3366ff;\">test<\/span> (x, y, method = ' <span style=\"color: #ff0000;\">spearman<\/span> ')\n\n\tSpearman's rank correlation rho\n\ndata: x and y\nS = 234, p-value = 0.2324\nalternative hypothesis: true rho is not equal to 0\nsample estimates:\n       rho \n-0.4181818<\/strong><\/span><\/pre>\n<p> <span style=\"color: #000000;\">Uit het resultaat kunnen we zien dat de Spearman-rangcorrelatie <strong>-0,41818<\/strong> is en de overeenkomstige p-waarde <strong>0,2324<\/strong> .<\/span><\/p>\n<p> <span style=\"color: #000000;\">Dit geeft aan dat er een negatieve correlatie bestaat tussen de twee vectoren.<\/span><\/p>\n<p> <span style=\"color: #000000;\">Omdat de p-waarde van de correlatie echter niet kleiner is dan 0,05, is de correlatie niet statistisch significant.<\/span><\/p>\n<h3> <span style=\"color: #000000;\"><strong>Voorbeeld 2: Spearman-rangcorrelatie tussen kolommen in het gegevensframe<\/strong><\/span><\/h3>\n<p> <span style=\"color: #000000;\">De volgende code laat zien hoe u de Spearman-rangcorrelatie tussen twee kolommen in een gegevensframe kunt berekenen:<\/span><\/p>\n<pre style=\"background-color: #ececec; font-size: 15px;\"> <span style=\"color: #000000;\"><strong><span style=\"color: #008080;\">#define data frame\n<\/span>df &lt;- data. <span style=\"color: #3366ff;\">frame<\/span> (team=c('A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J'),\n                 points=c(67, 70, 75, 78, 73, 89, 84, 99, 90, 91),\n                 assists=c(22, 27, 30, 23, 25, 31, 38, 35, 34, 32))\n\n<span style=\"color: #008080;\">#calculate Spearman rank correlation between x and y\n<\/span>horn. <span style=\"color: #3366ff;\">test<\/span> (df$points, df$assists, method = 'spearman')\n\n\tSpearman's rank correlation rho\n\ndata: df$points and df$assists\nS = 36, p-value = 0.01165\nalternative hypothesis: true rho is not equal to 0\nsample estimates:\n      rho \n0.7818182 \n<\/strong><\/span><\/pre>\n<p> <span style=\"color: #000000;\">Uit het resultaat kunnen we zien dat de Spearman-rangcorrelatie <strong>0,7818<\/strong> is en de overeenkomstige p-waarde <strong>0,01165<\/strong> .<\/span><\/p>\n<p> <span style=\"color: #000000;\">Dit geeft aan dat er een sterke positieve correlatie bestaat tussen de twee vectoren.<\/span><\/p>\n<p> <span style=\"color: #000000;\">Omdat de p-waarde van de correlatie kleiner is dan 0,05, is de correlatie statistisch significant.<\/span><\/p>\n<h3> <span style=\"color: #000000;\"><strong>Aanvullende bronnen<\/strong><\/span><\/h3>\n<p> <a href=\"https:\/\/statorials.org\/nl\/gedeeltelijke-correlatie-r\/\" target=\"_blank\" rel=\"noopener\">Hoe de gedeeltelijke correlatie in R te berekenen<\/a><br \/> <a href=\"https:\/\/statorials.org\/nl\/autocorrelatie-in-r\/\" target=\"_blank\" rel=\"noopener\">Hoe autocorrelatie in R te berekenen<\/a><br \/> <a href=\"https:\/\/statorials.org\/nl\/rollende-correlatie-in-r\/\" target=\"_blank\" rel=\"noopener\">Hoe de glijdende correlatie in R te berekenen<\/a><br \/> <a href=\"https:\/\/statorials.org\/nl\/hoe-u-speermancorrelatie-rapporteert\/\" target=\"_blank\" rel=\"noopener\">Hoe Spearman-correlatie in APA-formaat te rapporteren<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>In de statistiek verwijst correlatie naar de sterkte en richting van een verband tussen twee variabelen. De waarde van een correlatieco\u00ebffici\u00ebnt kan vari\u00ebren van -1 tot 1, met de volgende interpretaties: -1: een perfect negatief verband tussen twee variabelen 0: geen verband tussen twee variabelen 1: een perfecte positieve relatie tussen twee variabelen Een speciaal [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[11],"tags":[],"class_list":["post-2018","post","type-post","status-publish","format-standard","hentry","category-gids"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v21.5 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Hoe Spearman&#039;s rangcorrelatie in R - Statorials te berekenen<\/title>\n<meta name=\"description\" content=\"In deze tutorial wordt uitgelegd hoe u de Spearman-rangcorrelatie tussen twee variabelen in R kunt berekenen, met verschillende voorbeelden.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/statorials.org\/nl\/speermancorrelatie-in-r\/\" \/>\n<meta property=\"og:locale\" content=\"de_DE\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Hoe Spearman&#039;s rangcorrelatie in R - Statorials te berekenen\" \/>\n<meta property=\"og:description\" content=\"In deze tutorial wordt uitgelegd hoe u de Spearman-rangcorrelatie tussen twee variabelen in R kunt berekenen, met verschillende voorbeelden.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/statorials.org\/nl\/speermancorrelatie-in-r\/\" \/>\n<meta property=\"og:site_name\" content=\"Statorials\" \/>\n<meta property=\"article:published_time\" content=\"2023-07-24T01:57:10+00:00\" \/>\n<meta name=\"author\" content=\"Dr.benjamin anderson\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Verfasst von\" \/>\n\t<meta name=\"twitter:data1\" content=\"Dr.benjamin anderson\" \/>\n\t<meta name=\"twitter:label2\" content=\"Gesch\u00e4tzte Lesezeit\" \/>\n\t<meta name=\"twitter:data2\" content=\"2\u00a0Minuten\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/statorials.org\/nl\/speermancorrelatie-in-r\/\",\"url\":\"https:\/\/statorials.org\/nl\/speermancorrelatie-in-r\/\",\"name\":\"Hoe Spearman&#39;s rangcorrelatie in R - Statorials te berekenen\",\"isPartOf\":{\"@id\":\"https:\/\/statorials.org\/nl\/#website\"},\"datePublished\":\"2023-07-24T01:57:10+00:00\",\"dateModified\":\"2023-07-24T01:57:10+00:00\",\"author\":{\"@id\":\"https:\/\/statorials.org\/nl\/#\/schema\/person\/d4b8842173cca1bb62cdec41860e4219\"},\"description\":\"In deze tutorial wordt uitgelegd hoe u de Spearman-rangcorrelatie tussen twee variabelen in R kunt berekenen, met verschillende voorbeelden.\",\"breadcrumb\":{\"@id\":\"https:\/\/statorials.org\/nl\/speermancorrelatie-in-r\/#breadcrumb\"},\"inLanguage\":\"de\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/statorials.org\/nl\/speermancorrelatie-in-r\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/statorials.org\/nl\/speermancorrelatie-in-r\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Thuis\",\"item\":\"https:\/\/statorials.org\/nl\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Hoe de spearman-rangcorrelatie in r te berekenen\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/statorials.org\/nl\/#website\",\"url\":\"https:\/\/statorials.org\/nl\/\",\"name\":\"Statorials\",\"description\":\"Uw gids voor statistische competentie\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/statorials.org\/nl\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"de\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/statorials.org\/nl\/#\/schema\/person\/d4b8842173cca1bb62cdec41860e4219\",\"name\":\"Dr.benjamin anderson\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"de\",\"@id\":\"https:\/\/statorials.org\/nl\/#\/schema\/person\/image\/\",\"url\":\"http:\/\/statorials.org\/nl\/wp-content\/uploads\/2023\/10\/Dr.-Benjamin-Anderson-96x96.jpg\",\"contentUrl\":\"http:\/\/statorials.org\/nl\/wp-content\/uploads\/2023\/10\/Dr.-Benjamin-Anderson-96x96.jpg\",\"caption\":\"Dr.benjamin anderson\"},\"description\":\"Ik ben Benjamin, een gepensioneerde hoogleraar statistiek die nu een toegewijde Statorials-lesgever is. Ik heb uitgebreide ervaring en expertise op het gebied van statistiek en ik ben vastbesloten om mijn kennis te delen met studenten via Statorials. Lees verder\",\"sameAs\":[\"http:\/\/statorials.org\/nl\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Hoe Spearman&#39;s rangcorrelatie in R - Statorials te berekenen","description":"In deze tutorial wordt uitgelegd hoe u de Spearman-rangcorrelatie tussen twee variabelen in R kunt berekenen, met verschillende voorbeelden.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/statorials.org\/nl\/speermancorrelatie-in-r\/","og_locale":"de_DE","og_type":"article","og_title":"Hoe Spearman&#39;s rangcorrelatie in R - Statorials te berekenen","og_description":"In deze tutorial wordt uitgelegd hoe u de Spearman-rangcorrelatie tussen twee variabelen in R kunt berekenen, met verschillende voorbeelden.","og_url":"https:\/\/statorials.org\/nl\/speermancorrelatie-in-r\/","og_site_name":"Statorials","article_published_time":"2023-07-24T01:57:10+00:00","author":"Dr.benjamin anderson","twitter_card":"summary_large_image","twitter_misc":{"Verfasst von":"Dr.benjamin anderson","Gesch\u00e4tzte Lesezeit":"2\u00a0Minuten"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/statorials.org\/nl\/speermancorrelatie-in-r\/","url":"https:\/\/statorials.org\/nl\/speermancorrelatie-in-r\/","name":"Hoe Spearman&#39;s rangcorrelatie in R - Statorials te berekenen","isPartOf":{"@id":"https:\/\/statorials.org\/nl\/#website"},"datePublished":"2023-07-24T01:57:10+00:00","dateModified":"2023-07-24T01:57:10+00:00","author":{"@id":"https:\/\/statorials.org\/nl\/#\/schema\/person\/d4b8842173cca1bb62cdec41860e4219"},"description":"In deze tutorial wordt uitgelegd hoe u de Spearman-rangcorrelatie tussen twee variabelen in R kunt berekenen, met verschillende voorbeelden.","breadcrumb":{"@id":"https:\/\/statorials.org\/nl\/speermancorrelatie-in-r\/#breadcrumb"},"inLanguage":"de","potentialAction":[{"@type":"ReadAction","target":["https:\/\/statorials.org\/nl\/speermancorrelatie-in-r\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/statorials.org\/nl\/speermancorrelatie-in-r\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Thuis","item":"https:\/\/statorials.org\/nl\/"},{"@type":"ListItem","position":2,"name":"Hoe de spearman-rangcorrelatie in r te berekenen"}]},{"@type":"WebSite","@id":"https:\/\/statorials.org\/nl\/#website","url":"https:\/\/statorials.org\/nl\/","name":"Statorials","description":"Uw gids voor statistische competentie","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/statorials.org\/nl\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"de"},{"@type":"Person","@id":"https:\/\/statorials.org\/nl\/#\/schema\/person\/d4b8842173cca1bb62cdec41860e4219","name":"Dr.benjamin anderson","image":{"@type":"ImageObject","inLanguage":"de","@id":"https:\/\/statorials.org\/nl\/#\/schema\/person\/image\/","url":"http:\/\/statorials.org\/nl\/wp-content\/uploads\/2023\/10\/Dr.-Benjamin-Anderson-96x96.jpg","contentUrl":"http:\/\/statorials.org\/nl\/wp-content\/uploads\/2023\/10\/Dr.-Benjamin-Anderson-96x96.jpg","caption":"Dr.benjamin anderson"},"description":"Ik ben Benjamin, een gepensioneerde hoogleraar statistiek die nu een toegewijde Statorials-lesgever is. Ik heb uitgebreide ervaring en expertise op het gebied van statistiek en ik ben vastbesloten om mijn kennis te delen met studenten via Statorials. Lees verder","sameAs":["http:\/\/statorials.org\/nl"]}]}},"yoast_meta":{"yoast_wpseo_title":"","yoast_wpseo_metadesc":"","yoast_wpseo_canonical":""},"_links":{"self":[{"href":"https:\/\/statorials.org\/nl\/wp-json\/wp\/v2\/posts\/2018","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/statorials.org\/nl\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/statorials.org\/nl\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/statorials.org\/nl\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/statorials.org\/nl\/wp-json\/wp\/v2\/comments?post=2018"}],"version-history":[{"count":0,"href":"https:\/\/statorials.org\/nl\/wp-json\/wp\/v2\/posts\/2018\/revisions"}],"wp:attachment":[{"href":"https:\/\/statorials.org\/nl\/wp-json\/wp\/v2\/media?parent=2018"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/statorials.org\/nl\/wp-json\/wp\/v2\/categories?post=2018"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/statorials.org\/nl\/wp-json\/wp\/v2\/tags?post=2018"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}