{"id":4430,"date":"2023-07-11T04:37:05","date_gmt":"2023-07-11T04:37:05","guid":{"rendered":"https:\/\/statorials.org\/nl\/sas-rmse\/"},"modified":"2023-07-11T04:37:05","modified_gmt":"2023-07-11T04:37:05","slug":"sas-rmse","status":"publish","type":"post","link":"https:\/\/statorials.org\/nl\/sas-rmse\/","title":{"rendered":"Hoe rmse in sas te berekenen"},"content":{"rendered":"<p><\/p>\n<hr>\n<p><span style=\"color: #000000;\">Een manier om te evalueren hoe goed een regressiemodel bij een dataset past, is door de <strong>gemiddelde kwadratische fout<\/strong> te berekenen, een metriek die ons de gemiddelde afstand vertelt tussen de voorspelde waarden van het model en de werkelijke waarden van de dataset.<\/span><\/p>\n<p> <span style=\"color: #000000;\">Hoe lager de RMSE, hoe beter een bepaald model in een dataset kan \u2018passen\u2019.<\/span><\/p>\n<p> <span style=\"color: #000000;\">De formule voor het vinden van de gemiddelde kwadratische fout, vaak afgekort als <strong>RMSE<\/strong> , is:<\/span><\/p>\n<p> <span style=\"color: #000000;\"><strong>RMSE =<\/strong> \u221a <span style=\"border-top: 1px solid black;\">\u03a3(P <sub>ik<\/sub> \u2013 O <sub>ik<\/sub> ) <sup>2<\/sup> \/ n<\/span><\/span><\/p>\n<p> <span style=\"color: #000000;\">Goud:<\/span><\/p>\n<ul>\n<li> <span style=\"color: #000000;\">\u03a3 is een symbool dat \u201csom\u201d vertegenwoordigt<\/span><\/li>\n<li> <span style=\"color: #000000;\"><sub>Pi<\/sub> is de voorspelde waarde voor de <sup>i-<\/sup> de waarneming in de dataset<\/span><\/li>\n<li> <span style=\"color: #000000;\">O <sub>i<\/sub> is de waargenomen waarde voor de <sup>i-<\/sup> de waarneming in de dataset<\/span><\/li>\n<li> <span style=\"color: #000000;\">n is de steekproefomvang<\/span><\/li>\n<\/ul>\n<p> <span style=\"color: #000000;\">In het volgende stapsgewijze voorbeeld ziet u hoe u de RMSE berekent voor een eenvoudig lineair regressiemodel in SAS.<\/span><\/p>\n<h2> <span style=\"color: #000000;\"><b>Stap 1: Cre\u00eber de gegevens<\/b><\/span><\/h2>\n<p> <span style=\"color: #000000;\">Voor dit voorbeeld maken we een dataset aan met daarin het totaal aantal gestudeerde uren en het eindexamencijfer van 15 studenten.<\/span><\/p>\n<p> <span style=\"color: #000000;\">We passen een eenvoudig lineair regressiemodel toe met <em>uren<\/em> als voorspellende variabele en <em>score<\/em> als responsvariabele.<\/span><\/p>\n<p> <span style=\"color: #000000;\">De volgende code laat zien hoe u deze gegevensset in SAS maakt:<\/span> <\/p>\n<pre style=\"background-color: #ececec; font-size: 15px;\"> <strong><span style=\"color: #008000;\">\/*create dataset*\/\n<\/span><span style=\"color: #800080;\">data<\/span> exam_data;\n    <span style=\"color: #3366ff;\">input<\/span> hours score;\n    <span style=\"color: #3366ff;\">datalines<\/span> ;\n1 64\n2 66\n4 76\n5 73\n5 74\n6 81\n6 83\n7 82\n8 80\n10 88\n11 84\n11 82\n12 91\n12 93\n14 89\n;\n<span style=\"color: #800080;\">run<\/span> ;\n\n<span style=\"color: #008000;\">\/*view dataset*\/\n<\/span><span style=\"color: #800080;\">proc print<\/span> <span style=\"color: #3366ff;\">data<\/span> =exam_data;\n<\/strong><\/pre>\n<p><img decoding=\"async\" loading=\"lazy\" class=\" wp-image-22743 aligncenter\" src=\"https:\/\/statorials.org\/wp-content\/uploads\/2023\/08\/simplesas1.jpg\" alt=\"\" width=\"143\" height=\"367\" srcset=\"\" sizes=\"auto, \"><\/p>\n<h2> <span style=\"color: #000000;\"><b>Stap 2: Pas het eenvoudige lineaire regressiemodel toe<\/b><\/span><\/h2>\n<p> <span style=\"color: #000000;\">Vervolgens zullen we <strong>proc reg<\/strong> gebruiken om in het eenvoudige lineaire regressiemodel te passen:<\/span> <\/p>\n<pre style=\"background-color: #ececec; font-size: 15px;\"> <strong><span style=\"color: #008000;\">\/*fit simple linear regression model*\/\n<\/span><span style=\"color: #800080;\">proc reg<\/span> <span style=\"color: #3366ff;\">data<\/span> =exam_data;\n    <span style=\"color: #3366ff;\">model<\/span> score = hours;\n<span style=\"color: #800080;\">run<\/span> ;<\/strong> <\/pre>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"aligncenter wp-image-22744\" src=\"https:\/\/statorials.org\/wp-content\/uploads\/2023\/08\/simplesas2.jpg\" alt=\"eenvoudige lineaire regressie-uitvoer in SAS\" width=\"416\" height=\"501\" srcset=\"\" sizes=\"auto, \"><\/p>\n<p> <span style=\"color: #000000;\">Merk op dat de RMSE in de uitvoer <strong>3.64093<\/strong> is.<\/span><\/p>\n<h2> <span style=\"color: #000000;\"><strong>Stap 3: Haal de RMSE uit het regressiemodel<\/strong><\/span><\/h2>\n<p> <span style=\"color: #000000;\">Als u alleen de RMSE van dit model en geen van de andere uitvoerresultaten wilt weergeven, kunt u de volgende code gebruiken:<\/span> <\/p>\n<pre style=\"background-color: #ececec; font-size: 15px;\"> <strong><span style=\"color: #008000;\">\/*fit simple linear regression model*\/<\/span><span style=\"color: #000000;\"><span style=\"color: #800080;\">\nproc reg<\/span> <span style=\"color: #3366ff;\">data<\/span> =exam_data <span style=\"color: #3366ff;\">outest<\/span> =outest <span style=\"color: #3366ff;\">noprint<\/span> ;\n    <span style=\"color: #3366ff;\">model<\/span> score = hours \/ <span style=\"color: #3366ff;\">rmse<\/span> ;\n<span style=\"color: #800080;\">run<\/span> ;\n<span style=\"color: #800080;\">quit<\/span> ;\n\n<span style=\"color: #008000;\">\/*print RMSE of model*\/\n<\/span><span style=\"color: #800080;\">proc print<\/span> <span style=\"color: #3366ff;\">data<\/span> =outest;\n    <span style=\"color: #3366ff;\">var<\/span> _RMSE_;\n<span style=\"color: #800080;\">run<\/span> ;<\/span><\/strong> <\/pre>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"aligncenter wp-image-34702\" src=\"https:\/\/statorials.org\/wp-content\/uploads\/2023\/08\/rmse11.png\" alt=\"Bereken RMSE in SAS\" width=\"182\" height=\"96\" srcset=\"\" sizes=\"auto, \"><\/p>\n<p> <span style=\"color: #000000;\">Houd er rekening mee dat alleen de RMSE-waarde van <b>3,64093<\/b> in de uitvoer wordt weergegeven.<\/span><\/p>\n<p> <span style=\"color: #000000;\"><strong>Opmerking<\/strong> : het <strong>noprint-<\/strong> argument in <strong>proc reg<\/strong> vertelt SAS om niet de volledige uitvoer van regressieresultaten af te drukken, zoals in de vorige stap.<\/span><\/p>\n<h2> <span style=\"color: #000000;\"><strong>Aanvullende bronnen<\/strong><\/span><\/h2>\n<p> <span style=\"color: #000000;\">In de volgende zelfstudies wordt uitgelegd hoe u andere veelvoorkomende taken in SAS kunt uitvoeren:<\/span><\/p>\n<p> <span style=\"color: #000000;\"><a href=\"https:\/\/statorials.org\/nl\/eenvoudige-lineaire-regressie-in-sas\/\" target=\"_blank\" rel=\"noopener\">Hoe u eenvoudige lineaire regressie uitvoert in SAS<\/a><br \/> <a href=\"https:\/\/statorials.org\/nl\/meervoudige-lineaire-regressie-in-sas\/\" target=\"_blank\" rel=\"noopener\">Hoe u meerdere lineaire regressie uitvoert in SAS<\/a><br \/> <a href=\"https:\/\/statorials.org\/nl\/polynomiale-regressie-in-sas\/\" target=\"_blank\" rel=\"noopener\">Hoe polynomiale regressie uit te voeren in SAS<\/a><br \/> <a href=\"https:\/\/statorials.org\/nl\/logistische-regressie-in-de-luchtsluis\/\" target=\"_blank\" rel=\"noopener\">Hoe logistische regressie uit te voeren in SAS<\/a><\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Een manier om te evalueren hoe goed een regressiemodel bij een dataset past, is door de gemiddelde kwadratische fout te berekenen, een metriek die ons de gemiddelde afstand vertelt tussen de voorspelde waarden van het model en de werkelijke waarden van de dataset. Hoe lager de RMSE, hoe beter een bepaald model in een dataset [&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-4430","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 RMSE te berekenen in SAS - Statorials<\/title>\n<meta name=\"description\" content=\"In deze tutorial wordt aan de hand van een voorbeeld uitgelegd hoe u RMSE in SAS berekent.\" \/>\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\/sas-rmse\/\" \/>\n<meta property=\"og:locale\" content=\"de_DE\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Hoe RMSE te berekenen in SAS - Statorials\" \/>\n<meta property=\"og:description\" content=\"In deze tutorial wordt aan de hand van een voorbeeld uitgelegd hoe u RMSE in SAS berekent.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/statorials.org\/nl\/sas-rmse\/\" \/>\n<meta property=\"og:site_name\" content=\"Statorials\" \/>\n<meta property=\"article:published_time\" content=\"2023-07-11T04:37:05+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/statorials.org\/wp-content\/uploads\/2023\/08\/simplesas1.jpg\" \/>\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\/sas-rmse\/\",\"url\":\"https:\/\/statorials.org\/nl\/sas-rmse\/\",\"name\":\"Hoe RMSE te berekenen in SAS - Statorials\",\"isPartOf\":{\"@id\":\"https:\/\/statorials.org\/nl\/#website\"},\"datePublished\":\"2023-07-11T04:37:05+00:00\",\"dateModified\":\"2023-07-11T04:37:05+00:00\",\"author\":{\"@id\":\"https:\/\/statorials.org\/nl\/#\/schema\/person\/d4b8842173cca1bb62cdec41860e4219\"},\"description\":\"In deze tutorial wordt aan de hand van een voorbeeld uitgelegd hoe u RMSE in SAS berekent.\",\"breadcrumb\":{\"@id\":\"https:\/\/statorials.org\/nl\/sas-rmse\/#breadcrumb\"},\"inLanguage\":\"de\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/statorials.org\/nl\/sas-rmse\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/statorials.org\/nl\/sas-rmse\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Thuis\",\"item\":\"https:\/\/statorials.org\/nl\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Hoe rmse in sas 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 RMSE te berekenen in SAS - Statorials","description":"In deze tutorial wordt aan de hand van een voorbeeld uitgelegd hoe u RMSE in SAS berekent.","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\/sas-rmse\/","og_locale":"de_DE","og_type":"article","og_title":"Hoe RMSE te berekenen in SAS - Statorials","og_description":"In deze tutorial wordt aan de hand van een voorbeeld uitgelegd hoe u RMSE in SAS berekent.","og_url":"https:\/\/statorials.org\/nl\/sas-rmse\/","og_site_name":"Statorials","article_published_time":"2023-07-11T04:37:05+00:00","og_image":[{"url":"https:\/\/statorials.org\/wp-content\/uploads\/2023\/08\/simplesas1.jpg"}],"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\/sas-rmse\/","url":"https:\/\/statorials.org\/nl\/sas-rmse\/","name":"Hoe RMSE te berekenen in SAS - Statorials","isPartOf":{"@id":"https:\/\/statorials.org\/nl\/#website"},"datePublished":"2023-07-11T04:37:05+00:00","dateModified":"2023-07-11T04:37:05+00:00","author":{"@id":"https:\/\/statorials.org\/nl\/#\/schema\/person\/d4b8842173cca1bb62cdec41860e4219"},"description":"In deze tutorial wordt aan de hand van een voorbeeld uitgelegd hoe u RMSE in SAS berekent.","breadcrumb":{"@id":"https:\/\/statorials.org\/nl\/sas-rmse\/#breadcrumb"},"inLanguage":"de","potentialAction":[{"@type":"ReadAction","target":["https:\/\/statorials.org\/nl\/sas-rmse\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/statorials.org\/nl\/sas-rmse\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Thuis","item":"https:\/\/statorials.org\/nl\/"},{"@type":"ListItem","position":2,"name":"Hoe rmse in sas 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\/4430","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=4430"}],"version-history":[{"count":0,"href":"https:\/\/statorials.org\/nl\/wp-json\/wp\/v2\/posts\/4430\/revisions"}],"wp:attachment":[{"href":"https:\/\/statorials.org\/nl\/wp-json\/wp\/v2\/media?parent=4430"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/statorials.org\/nl\/wp-json\/wp\/v2\/categories?post=4430"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/statorials.org\/nl\/wp-json\/wp\/v2\/tags?post=4430"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}