{"id":3661,"date":"2023-07-16T06:46:06","date_gmt":"2023-07-16T06:46:06","guid":{"rendered":"https:\/\/statorials.org\/de\/extrahiere-rmse-aus-lm-in-r\/"},"modified":"2023-07-16T06:46:06","modified_gmt":"2023-07-16T06:46:06","slug":"extrahiere-rmse-aus-lm-in-r","status":"publish","type":"post","link":"https:\/\/statorials.org\/de\/extrahiere-rmse-aus-lm-in-r\/","title":{"rendered":"So extrahieren sie rmse aus der funktion lm() in r"},"content":{"rendered":"<p><\/p>\n<hr>\n<p><span style=\"color: #000000;\">Sie k\u00f6nnen die folgende Syntax verwenden, um den <strong>quadratischen Mittelwert (Root Mean Square Error, RMSE)<\/strong> der Funktion <a href=\"https:\/\/statorials.org\/de\/lm-funktion-in-r\/\" target=\"_blank\" rel=\"noopener\">lm()<\/a> in R zu extrahieren:<\/span><\/p>\n<pre style=\"background-color: #ececec; font-size: 15px;\"> <strong>sqrt(mean(model$residuals^2))\n<\/strong><\/pre>\n<p> <span style=\"color: #000000;\">Das folgende Beispiel zeigt, wie diese Syntax in der Praxis verwendet wird.<\/span><\/p>\n<p> <span style=\"color: #000000;\"><strong>Verwandte Themen:<\/strong> <a href=\"https:\/\/statorials.org\/de\/wie-man-rmse-interpretiert\/\" target=\"_blank\" rel=\"noopener\">So interpretieren Sie den quadratischen Mittelwertfehler (RMSE)<\/a><\/span><\/p>\n<h2> <span style=\"color: #000000;\"><strong>Beispiel: RMSE aus lm() in R extrahieren<\/strong><\/span><\/h2>\n<p> <span style=\"color: #000000;\">Angenommen, wir passen das folgende multiple lineare Regressionsmodell in R an:<\/span><\/p>\n<pre style=\"background-color: #ececec; font-size: 15px;\"> <strong><span style=\"color: #008080;\">#create data frame\n<\/span>df &lt;- data. <span style=\"color: #3366ff;\">frame<\/span> (rating=c(67, 75, 79, 85, 90, 96, 97),\n                 points=c(8, 12, 16, 15, 22, 28, 24),\n                 assists=c(4, 6, 6, 5, 3, 8, 7),\n                 rebounds=c(1, 4, 3, 3, 2, 6, 7))\n\n<span style=\"color: #008080;\">#fit multiple linear regression model\n<\/span>model &lt;- lm(rating ~ points + assists + rebounds, data=df)\n<\/strong><\/pre>\n<p> <span style=\"color: #000000;\">Wir k\u00f6nnen die Funktion <strong>summary()<\/strong> verwenden, um die vollst\u00e4ndige Zusammenfassung des Regressionsmodells anzuzeigen:<\/span><\/p>\n<pre style=\"background-color: #ececec; font-size: 15px;\"> <strong><span style=\"color: #008080;\">#view model summary\n<\/span>summary(model)\n\nCall:\nlm(formula = rating ~ points + assists + rebounds, data = df)\n\nResiduals:\n      1 2 3 4 5 6 7 \n-1.5902 -1.7181 0.2413 4.8597 -1.0201 -0.6082 -0.1644 \n\nCoefficients:\n            Estimate Std. Error t value Pr(&gt;|t|)   \n(Intercept) 66.4355 6.6932 9.926 0.00218 **\npoints 1.2152 0.2788 4.359 0.02232 * \nassists -2.5968 1.6263 -1.597 0.20860   \nrebounds 2.8202 1.6118 1.750 0.17847   \n---\nSignificant. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1\n\nResidual standard error: 3.193 on 3 degrees of freedom\nMultiple R-squared: 0.9589, Adjusted R-squared: 0.9179 \nF-statistic: 23.35 on 3 and 3 DF, p-value: 0.01396\n<\/strong><\/pre>\n<p> <span style=\"color: #000000;\">Um nur den quadratischen Mittelwert (Root Mean Square Error, RMSE) des Modells zu extrahieren, k\u00f6nnen wir die folgende Syntax verwenden:<\/span><\/p>\n<pre style=\"background-color: #ececec; font-size: 15px;\"> <strong><span style=\"color: #008080;\">#extract RMSE of regression model\n<span style=\"color: #000000;\">sqrt(mean(model$residuals^2))\n\n[1] 2.090564\n<\/span><\/span><\/strong><\/pre>\n<p> <span style=\"color: #000000;\">Der RMSE des Modells betr\u00e4gt <strong>2,090564<\/strong> .<\/span><\/p>\n<p> <span style=\"color: #000000;\">Dies stellt den durchschnittlichen Abstand zwischen den vorhergesagten Werten des Modells und den tats\u00e4chlichen Werten des Datensatzes dar.<\/span><\/p>\n<p> <span style=\"color: #000000;\">Beachten Sie, dass ein bestimmtes Modell umso besser an einen Datensatz \u201epassen\u201c kann, je niedriger der RMSE ist.<\/span><\/p>\n<p> <span style=\"color: #000000;\">Beim Vergleich mehrerer verschiedener Regressionsmodelle wird das Modell mit dem niedrigsten RMSE als das Modell angesehen, das am besten zum Datensatz \u201epasst\u201c.<\/span><\/p>\n<h2> <span style=\"color: #000000;\"><strong>Zus\u00e4tzliche Ressourcen<\/strong><\/span><\/h2>\n<p> <span style=\"color: #000000;\">In den folgenden Tutorials wird erl\u00e4utert, wie Sie andere h\u00e4ufige Aufgaben in R ausf\u00fchren:<\/span><\/p>\n<p> <a href=\"https:\/\/statorials.org\/de\/einfache-lineare-regression-in-r\/\" target=\"_blank\" rel=\"noopener\">So f\u00fchren Sie eine einfache lineare Regression in R durch<\/a><br \/> <a href=\"https:\/\/statorials.org\/de\/multiple-lineare-regression-r\/\" target=\"_blank\" rel=\"noopener\">So f\u00fchren Sie eine multiple lineare Regression in R durch<\/a><br \/> <a href=\"https:\/\/statorials.org\/de\/restspur-r\/\" target=\"_blank\" rel=\"noopener\">So erstellen Sie ein Residuendiagramm in R<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Sie k\u00f6nnen die folgende Syntax verwenden, um den quadratischen Mittelwert (Root Mean Square Error, RMSE) der Funktion lm() in R zu extrahieren: sqrt(mean(model$residuals^2)) Das folgende Beispiel zeigt, wie diese Syntax in der Praxis verwendet wird. Verwandte Themen: So interpretieren Sie den quadratischen Mittelwertfehler (RMSE) Beispiel: RMSE aus lm() in R extrahieren Angenommen, wir passen das [&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":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v21.5 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>So extrahieren Sie RMSE aus der Funktion lm() in R - Statorials<\/title>\n<meta name=\"description\" content=\"In diesem Tutorial wird anhand eines Beispiels erl\u00e4utert, wie der RMSE-Wert aus der Funktion lm() f\u00fcr ein Regressionsmodell in R extrahiert wird.\" \/>\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\/de\/extrahiere-rmse-aus-lm-in-r\/\" \/>\n<meta property=\"og:locale\" content=\"de_DE\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"So extrahieren Sie RMSE aus der Funktion lm() in R - Statorials\" \/>\n<meta property=\"og:description\" content=\"In diesem Tutorial wird anhand eines Beispiels erl\u00e4utert, wie der RMSE-Wert aus der Funktion lm() f\u00fcr ein Regressionsmodell in R extrahiert wird.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/statorials.org\/de\/extrahiere-rmse-aus-lm-in-r\/\" \/>\n<meta property=\"og:site_name\" content=\"Statorials\" \/>\n<meta property=\"article:published_time\" content=\"2023-07-16T06:46:06+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 Minuten\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/statorials.org\/de\/extrahiere-rmse-aus-lm-in-r\/\",\"url\":\"https:\/\/statorials.org\/de\/extrahiere-rmse-aus-lm-in-r\/\",\"name\":\"So extrahieren Sie RMSE aus der Funktion lm() in R - Statorials\",\"isPartOf\":{\"@id\":\"https:\/\/statorials.org\/de\/#website\"},\"datePublished\":\"2023-07-16T06:46:06+00:00\",\"dateModified\":\"2023-07-16T06:46:06+00:00\",\"author\":{\"@id\":\"https:\/\/statorials.org\/de\/#\/schema\/person\/ec75c4d6365f2708f8a0ad3a42121aa0\"},\"description\":\"In diesem Tutorial wird anhand eines Beispiels erl\u00e4utert, wie der RMSE-Wert aus der Funktion lm() f\u00fcr ein Regressionsmodell in R extrahiert wird.\",\"breadcrumb\":{\"@id\":\"https:\/\/statorials.org\/de\/extrahiere-rmse-aus-lm-in-r\/#breadcrumb\"},\"inLanguage\":\"de-DE\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/statorials.org\/de\/extrahiere-rmse-aus-lm-in-r\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/statorials.org\/de\/extrahiere-rmse-aus-lm-in-r\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Heim\",\"item\":\"https:\/\/statorials.org\/de\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"So extrahieren sie rmse aus der funktion lm() in r\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/statorials.org\/de\/#website\",\"url\":\"https:\/\/statorials.org\/de\/\",\"name\":\"Statorials\",\"description\":\"Ihr Leitfaden f\u00fcr statistische Kompetenz !\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/statorials.org\/de\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"de-DE\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/statorials.org\/de\/#\/schema\/person\/ec75c4d6365f2708f8a0ad3a42121aa0\",\"name\":\"Dr. Benjamin Anderson\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"de-DE\",\"@id\":\"https:\/\/statorials.org\/de\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/statorials.org\/de\/wp-content\/uploads\/2023\/11\/Benjamin-Anderson-96x96.jpg\",\"contentUrl\":\"https:\/\/statorials.org\/de\/wp-content\/uploads\/2023\/11\/Benjamin-Anderson-96x96.jpg\",\"caption\":\"Dr. Benjamin Anderson\"},\"description\":\"Hallo, ich bin Benjamin, ein pensionierter Statistikprofessor, der sich zum engagierten Statorials-Lehrer entwickelt hat. Mit umfassender Erfahrung und Fachwissen auf dem Gebiet der Statistik bin ich bestrebt, mein Wissen zu teilen, um Studenten durch Statorials zu bef\u00e4higen. Mehr wissen\",\"sameAs\":[\"https:\/\/statorials.org\/de\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"So extrahieren Sie RMSE aus der Funktion lm() in R - Statorials","description":"In diesem Tutorial wird anhand eines Beispiels erl\u00e4utert, wie der RMSE-Wert aus der Funktion lm() f\u00fcr ein Regressionsmodell in R extrahiert wird.","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\/de\/extrahiere-rmse-aus-lm-in-r\/","og_locale":"de_DE","og_type":"article","og_title":"So extrahieren Sie RMSE aus der Funktion lm() in R - Statorials","og_description":"In diesem Tutorial wird anhand eines Beispiels erl\u00e4utert, wie der RMSE-Wert aus der Funktion lm() f\u00fcr ein Regressionsmodell in R extrahiert wird.","og_url":"https:\/\/statorials.org\/de\/extrahiere-rmse-aus-lm-in-r\/","og_site_name":"Statorials","article_published_time":"2023-07-16T06:46:06+00:00","author":"Dr. Benjamin Anderson","twitter_card":"summary_large_image","twitter_misc":{"Verfasst von":"Dr. Benjamin Anderson","Gesch\u00e4tzte Lesezeit":"2 Minuten"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/statorials.org\/de\/extrahiere-rmse-aus-lm-in-r\/","url":"https:\/\/statorials.org\/de\/extrahiere-rmse-aus-lm-in-r\/","name":"So extrahieren Sie RMSE aus der Funktion lm() in R - Statorials","isPartOf":{"@id":"https:\/\/statorials.org\/de\/#website"},"datePublished":"2023-07-16T06:46:06+00:00","dateModified":"2023-07-16T06:46:06+00:00","author":{"@id":"https:\/\/statorials.org\/de\/#\/schema\/person\/ec75c4d6365f2708f8a0ad3a42121aa0"},"description":"In diesem Tutorial wird anhand eines Beispiels erl\u00e4utert, wie der RMSE-Wert aus der Funktion lm() f\u00fcr ein Regressionsmodell in R extrahiert wird.","breadcrumb":{"@id":"https:\/\/statorials.org\/de\/extrahiere-rmse-aus-lm-in-r\/#breadcrumb"},"inLanguage":"de-DE","potentialAction":[{"@type":"ReadAction","target":["https:\/\/statorials.org\/de\/extrahiere-rmse-aus-lm-in-r\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/statorials.org\/de\/extrahiere-rmse-aus-lm-in-r\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Heim","item":"https:\/\/statorials.org\/de\/"},{"@type":"ListItem","position":2,"name":"So extrahieren sie rmse aus der funktion lm() in r"}]},{"@type":"WebSite","@id":"https:\/\/statorials.org\/de\/#website","url":"https:\/\/statorials.org\/de\/","name":"Statorials","description":"Ihr Leitfaden f\u00fcr statistische Kompetenz !","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/statorials.org\/de\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"de-DE"},{"@type":"Person","@id":"https:\/\/statorials.org\/de\/#\/schema\/person\/ec75c4d6365f2708f8a0ad3a42121aa0","name":"Dr. Benjamin Anderson","image":{"@type":"ImageObject","inLanguage":"de-DE","@id":"https:\/\/statorials.org\/de\/#\/schema\/person\/image\/","url":"https:\/\/statorials.org\/de\/wp-content\/uploads\/2023\/11\/Benjamin-Anderson-96x96.jpg","contentUrl":"https:\/\/statorials.org\/de\/wp-content\/uploads\/2023\/11\/Benjamin-Anderson-96x96.jpg","caption":"Dr. Benjamin Anderson"},"description":"Hallo, ich bin Benjamin, ein pensionierter Statistikprofessor, der sich zum engagierten Statorials-Lehrer entwickelt hat. Mit umfassender Erfahrung und Fachwissen auf dem Gebiet der Statistik bin ich bestrebt, mein Wissen zu teilen, um Studenten durch Statorials zu bef\u00e4higen. Mehr wissen","sameAs":["https:\/\/statorials.org\/de"]}]}},"yoast_meta":{"yoast_wpseo_title":"","yoast_wpseo_metadesc":"","yoast_wpseo_canonical":""},"_links":{"self":[{"href":"https:\/\/statorials.org\/de\/wp-json\/wp\/v2\/posts\/3661"}],"collection":[{"href":"https:\/\/statorials.org\/de\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/statorials.org\/de\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/statorials.org\/de\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/statorials.org\/de\/wp-json\/wp\/v2\/comments?post=3661"}],"version-history":[{"count":0,"href":"https:\/\/statorials.org\/de\/wp-json\/wp\/v2\/posts\/3661\/revisions"}],"wp:attachment":[{"href":"https:\/\/statorials.org\/de\/wp-json\/wp\/v2\/media?parent=3661"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/statorials.org\/de\/wp-json\/wp\/v2\/categories?post=3661"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/statorials.org\/de\/wp-json\/wp\/v2\/tags?post=3661"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}